package kcg.imis.moniter.mapper;

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

import kcg.imis.moniter.vo.MoniterSearchVO;
import kcg.imis.moniter.vo.MoniterVO;

import org.springframework.stereotype.Repository;

import egovframework.rte.psl.dataaccess.EgovAbstractMapper;

/**
  * @FileName : MoniterMapper.java
  * @Project : 국제해양프로젝트
  * @Date : 2018. 4. 13. 
  * @작성자 : Moon
  * @변경이력 : 
  * @프로그램 설명 :
 */
@Repository("moniterMapper")
public class MoniterMapper extends EgovAbstractMapper {

	/**
	 * 국가별 참고사이트 목록 조회
	 * @param idx
	 * @return
	 * @throws Exception
	 */
	public List<MoniterVO> getMoniterList(final String idx) throws Exception {
		return selectList("Moniter.getMoniterList", idx);
	}
	
	/**
	 * 모니터링 시스템 목록 조회 
	 * @param vo
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> getMoniterList(final MoniterSearchVO vo) throws Exception {
		return selectList("Moniter.getMoniterTree", vo);
	}
	
	
	public MoniterVO getMoniterInfo(final String idx) throws Exception {
		return selectOne("Moniter.getMoniterInfo", idx);
	}
	
	public int getMaxIdx() throws Exception {
		return (Integer)selectOne("Moniter.getMaxIdx");
	}
	
	public int insertMoniterInfo(final MoniterVO vo) throws Exception {
		return insert("Moniter.insertMoniterInfo", vo);
	}
	
	public int updateMoniterInfo(final MoniterVO vo) throws Exception {
		return update("Moniter.updateMoniterInfo", vo);
	}
	
	public int deleteMoniterTree(final MoniterSearchVO vo) throws Exception {
		return delete("Moniter.deleteMoniterTree", vo);
	}
	
}
