@Repository("noticeDao")
public class NoticeDao extends SqlMapClientDaoSupport {
 
    /**
     * iBatis SqlMap 정보를 읽기 위한 sqlMapClient 세팅
     * @param sqlMapClient - 설정파일로부터 읽어온 정보 
    */
    @Resource(name = "sqlMapClient")
    public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
        super.setSqlMapClient(sqlMapClient);
    }
 
	/**
	 * 등록된 글의 수를 조회한다.
	 * @return	등록된 글의 수
	*/
	public int selectCount() {
		return (Integer) getSqlMapClientTemplate().queryForObject("selectCount");
	}
 
	/**
	 * id 에 해당하는 글을 조회한다.
	 * @param id - 등록된 글의 아이디
	 * @return 등록된 글의 정보가 담긴 NoticeVo
	*/
	public NoticeVo select(int id) {
		return (NoticeVo) getSqlMapClientTemplate().queryForObject("select", id);
	}
 
	/**
	 * 등록된 모든 글을 조회한다.
	 * @return	등록된 글의 목록을 담고 있는 NoticeVo 의 리스트
	*/
	@SuppressWarnings("unchecked")
	public List<NoticeVo> selectList() {
		return getSqlMapClientTemplate().queryForList("selectList", new NoticeVo());
	}
 
	/**
	 * 조회 조건에 해당하는 글을 조회한다.
	 * @param   searchNoticeVo  조회 조건을 담고 있는 NoticeVo 
	 * @return	등록된 글의 목록을 담고 있는 NoticeVo 의 리스트
	*/
	@SuppressWarnings("unchecked")
	public List<NoticeVo> selectList(NoticeVo searchNoticeVo) {
		return getSqlMapClientTemplate().queryForList("selectList", searchNoticeVo);
	}
 
	/**
	 * 글을 등록한다.
	 * @param 등록할 글의 정보를 담고 있는 noticeVo
	*/
	public void insert(NoticeVo noticeVo) {
		getSqlMapClientTemplate().insert("insert", noticeVo);
	}
 
	/**
	 * 글을 삭제한다.
	 * @param id - 등록된 글의 아이디
	*/
	public int delete(int id) {
		return getSqlMapClientTemplate().delete("delete", id);
	}
}
 
egovframework/dev/tst/noticedao.java.txt · 마지막 수정: 2023/12/21 05:21 (외부 편집기)
 
이 위키의 내용은 다음의 라이센스에 따릅니다 :CC Attribution-Noncommercial-Share Alike 3.0 Unported
전자정부 표준프레임워크 라이센스(바로가기)

전자정부 표준프레임워크 활용의 안정성 보장을 위해 위험성을 지속적으로 모니터링하고 있으나, 오픈소스의 특성상 문제가 발생할 수 있습니다.
전자정부 표준프레임워크는 Apache 2.0 라이선스를 따르고 있는 오픈소스 프로그램입니다. Apache 2.0 라이선스에 따라 표준프레임워크를 활용하여 발생된 업무중단, 컴퓨터 고장 또는 오동작으로 인한 손해 등에 대해서 책임이 없습니다.
Recent changes RSS feed CC Attribution-Noncommercial-Share Alike 3.0 Unported Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki