package com.palmnest.dao.notice.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.palmnest.dao.hibernate.GenericDaoHibernate;
import com.palmnest.dao.notice.AppNoticeDetailDao;
import com.palmnest.model.notice.AppNoticeDetailModel;

@Repository("appNoticeDetailDao")
public class AppNoticeDetailDaoImpl extends GenericDaoHibernate<AppNoticeDetailModel, Integer> implements AppNoticeDetailDao {

	public AppNoticeDetailDaoImpl() {
		super(AppNoticeDetailModel.class);

	}

	@Override
	public List<AppNoticeDetailModel> getNoticeDetail(Integer noticeId) {
		String sql = "from AppNoticeDetailModel where sourceId=? and isEnabled='1' ";
		List<AppNoticeDetailModel> list = getSession().createQuery(sql).setInteger(0, noticeId).list();
		return list;
	}
}
