package com.palmnest.dao.dinner.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.palmnest.dao.dinner.RechargeRecordDao;
import com.palmnest.dao.hibernate.GenericDaoHibernate;
import com.palmnest.model.dinner.RechargeRecord;
import com.palmnest.model.dinner.RechargeSet;

@Repository("rechargeRecordDao")
public class RechargeRecordDaoImpl extends GenericDaoHibernate<RechargeRecord, Long> implements RechargeRecordDao {

	private static Logger LOG = LoggerFactory.getLogger(RechargeRecordDaoImpl.class);

	public RechargeRecordDaoImpl() {
		super(RechargeRecord.class);
	}

	@Override
	public List<RechargeRecord> findByOrgId(String orgId) {
		String sql = "from RechargeRecord where orgId=? ";
		return getSession().createQuery(sql).setString(0, orgId).list();
	}
}
