package com.eactive.eai.rms.bap.manage.message.messageitem;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.eactive.eai.rms.common.base.SqlMapClientTemplateDao;

@Repository("bapMessageItemDao")
@SuppressWarnings({"deprecation","unchecked"})
public class BapMessageItemDao extends SqlMapClientTemplateDao {

	public int selectListCount(HashMap<String, Object> param) throws Exception {

		int totalcnt = (Integer)template.queryForObject("MessageItem.selectListCount", param);

    	return totalcnt;
    }	

	public List<Map<String, Object>> selectList(HashMap<String, Object> param) throws Exception {
		
		return (List<Map<String, Object>>)template.queryForList("MessageItem.selectList", param);
    }	

	public HashMap<String, Object> selectDetail(String MsgItemDsticName) throws Exception {
		HashMap<String, Object> param = new HashMap<String, Object>();

		param.put("MsgItemDsticName", MsgItemDsticName);
     	return (HashMap<String, Object>)template.queryForObject("MessageItem.selectDetail", param);
    }
	public HashMap<String, Object> selectAutoCd() throws Exception {
		HashMap<String, Object> param = new HashMap<String, Object>();
     	return (HashMap<String, Object>)template.queryForObject("MessageItem.selectAutoCd", param);
    }		
	
    public void insert(HashMap<String, Object> paramMap) throws Exception{

        this.template.insert("MessageItem.insert", paramMap);
    }

    public void update(HashMap<String, Object> paramMap) throws Exception{
        this.template.update("MessageItem.update", paramMap);
    }

    public void delete(HashMap<String, Object> paramMap) throws Exception{
        this.template.delete("MessageItem.delete", paramMap);
    }

	public List<Map<String, Object>> getMsgGroupDstcd(HashMap<String, Object> param) throws Exception {
		
		return (List<Map<String, Object>>)template.queryForList("MessageItem.getMsgGroupDstcd", param);
    }	

    
}