IMIS/src/main/java/kcg/imis/cmmn/mapper/CodeMapper.java

89 lines
1.8 KiB
Java

package kcg.imis.cmmn.mapper;
import java.util.List;
import kcg.imis.cmmn.vo.CodeVO;
import org.springframework.stereotype.Repository;
import egovframework.rte.psl.dataaccess.EgovAbstractMapper;
/**
*
* @FileName : CodeMapper.java
* @Project : 국제해양프로젝트
* @Date : 2018. 3. 21.
* @작성자 : Moon
* @변경이력 :
* @프로그램 설명 :
*/
@Repository("codeMapper")
public class CodeMapper extends EgovAbstractMapper {
/**
* 코드 목록을 조회한다
* @param group 그룹 코드
* @return
* @throws Exception
*/
public List<CodeVO> getCodeList(final String group)
throws Exception {
CodeVO codeVO = new CodeVO();
codeVO.setGroup(group);
return selectList("Code.getCodeList", codeVO);
}
/**
* 코드 상세 조회 한다
* @param group
* @param code
* @return
* @throws Exception
*/
public CodeVO getCode(final String group, final String code)
throws Exception {
CodeVO codeVO = new CodeVO();
codeVO.setGroup(group);
codeVO.setCode(code);
return selectOne("Code.getCode", codeVO);
}
/**
* code를 수정한다.
*
* @param codeVO CodeVO 객체
* @return 성공 - 1, 실패 - 0
* @throws Exception 기본 예외 처리
*/
public int updateCode(final CodeVO codeVO) throws Exception {
return update("Code.updateCode", codeVO);
}
/**
* code를 추가한다.
*
* @param codeVO CodeVO 객체
* @return 성공 - 1, 실패 - 0
* @throws Exception 기본 예외 처리
*/
public int insertCode(final CodeVO codeVO) throws Exception {
return insert("Code.insertCode", codeVO);
}
/**
* code를 삭제한다.
*
* @param codeVO CodeVO 객체
* @return 성공 - 1, 실패 - 0
* @throws Exception 기본 예외 처리
*/
public int deleteCode(CodeVO codeVO) {
return delete("Code.deleteCode", codeVO);
}
}