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

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

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

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

    	return totalcnt;
    }	

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

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

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

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

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

	public List<Map<String, Object>> getMsgMetaDstcd(HashMap<String,Object> map) throws Exception {

		return (List<Map<String, Object>>)template.queryForList("ClassMap.getMsgMetaDstcd",map);
    }	
	
	public List<Map<String, Object>> getTelgmClsName(HashMap<String,Object> map) throws Exception {
		
		return (List<Map<String, Object>>)template.queryForList("ClassMap.getTelgmClsName",map);
    }		
    
}