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

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("bapClassInfoDao")
@SuppressWarnings({"deprecation","unchecked"})
public class BapClassInfoDao extends SqlMapClientTemplateDao {

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

		int totalcnt = (Integer)template.queryForObject("ClassInfo.count", param);

    	return totalcnt;
    }	

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

	public HashMap<String, Object> selectDetail(String key) throws Exception {
		HashMap<String, Object> param = new HashMap<String, Object>();
		// key = TelgmClsName
		param.put("telgmClsName", key);
     	return (HashMap<String, Object>)template.queryForObject("ClassInfo.detail", param);
    }
	
    public void insert(HashMap<String, Object> paramMap) throws Exception{

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

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

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

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

    
}