package com.eactive.eai.rms.bap.manage.work.kikwan;

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

	public int selectListCount(HashMap<String, Object> param) throws Exception {
    	return (Integer)template.queryForObject("BapKikwan.selectListCount", param);
    }	

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

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

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

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

}