package com.eactive.eai.rms.bap.manage.mmi;

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

import org.springframework.stereotype.Repository;

import com.eactive.eai.rms.bap.manage.mmi.MMIBAPSyncController.BapDeploy;
import com.eactive.eai.rms.common.base.SqlMapClientTemplateDao;

@Repository("mmiBapSyncDao")
@SuppressWarnings({"deprecation"})
public class MMIBAPSyncDao extends SqlMapClientTemplateDao {

	public void insertBJ01(BapDeploy bapDeploy) throws Exception{
		this.template.insert("mmiBapSync.insertBJ01", bapDeploy);
	}

	public String generatePKBJ01(BapDeploy bapDeploy ) throws Exception{
		return (String)this.template.queryForObject("mmiBapSync.generatePKBJ01", bapDeploy);
	}

	public int selectCountBJ01(BapDeploy bapDeploy) throws Exception{
		return (Integer)this.template.queryForObject("mmiBapSync.selectCountBJ01", bapDeploy);
	}

	public String selectBzwkDstCd(BapDeploy bapDeploy) throws Exception{
		return (String)this.template.queryForObject("mmiBapSync.selectBzwkDstCd", bapDeploy);
	}

	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> selectSysGbCd(HashMap<String, Object> param) throws Exception {
		return (List<Map<String, Object>>)template.queryForList("mmiBapSync.selectSysGbCd", param);
	}	

	public String getNdmNodeBySysId(HashMap<String, Object> paramMap ) throws Exception{
		return (String)this.template.queryForObject("mmiBapSync.selectNdmNodeBySysId", paramMap);
	}

	public String selectPKBJ01(BapDeploy bapDeploy ) throws Exception{
		return (String)this.template.queryForObject("mmiBapSync.selectPKBJ01", bapDeploy);
	}

	public void updateBJ01(BapDeploy bapDeploy) throws Exception{
		this.template.update("mmiBapSync.updateBJ01", bapDeploy);        
	}
	
	public void insertBS01(HashMap<String, Object> paramMap) throws Exception{
		this.template.insert("mmiBapSync.insertBS01", paramMap);
	}

	public String generatePKBS01(HashMap<String, Object> paramMap ) throws Exception{
		return (String)this.template.queryForObject("mmiBapSync.generatePKBS01", paramMap);
	}

	public int selectCountBS01(HashMap<String, Object> paramMap ) throws Exception{
		return (Integer)this.template.queryForObject("mmiBapSync.selectCountBS01", paramMap);
	}

	public String selectPKBS01(HashMap<String, Object> paramMap ) throws Exception{
		return (String)this.template.queryForObject("mmiBapSync.selectPKBS01", paramMap);
	}

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

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

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

	// added by cskim
	public void insertBapDeploy(BapDeploy bapDeploy) throws Exception {
		this.template.insert("mmiBapSync.insertBapDeploy", bapDeploy);
	}
}
