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

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

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

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

    	return totalcnt;
    }	

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

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

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

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

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

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