package com.palmnest.dao.estateserve.impl;

import java.util.List;

import org.directwebremoting.util.Logger;
import org.springframework.stereotype.Repository;

import com.palmnest.dao.estateserve.DepositItemInformationFormDao;
import com.palmnest.dao.hibernate.GenericDaoHibernate;
import com.palmnest.model.estateserve.DepositItemInformationForm;


@Repository("depositItemInformationFormDao")
public class DepositItemInformationFormDaoImpl extends GenericDaoHibernate<DepositItemInformationForm, Integer>
		implements DepositItemInformationFormDao {

	private Logger LOG = Logger.getLogger(DepositItemInformationFormDaoImpl.class);

	public DepositItemInformationFormDaoImpl() {
		super(DepositItemInformationForm.class);
	}

	@Override
	public List<DepositItemInformationForm> getDepositItemInformationFormList(
			Integer serviceTypeInfoId) throws Exception {
		try {
			String strHQL = "from DepositItemInformationForm  where serviceTypeInfoId=? and isEnabled=?";
			return this.getSession().createQuery(strHQL).setInteger(0, serviceTypeInfoId).setString(1, "1").list();
		} catch (Exception e) {
			LOG.error("dao get getDepositItemInformationFormList error{}", e);
		}
		return null;
	}

}
