package cmm.service.impl;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import cmm.service.CmmActivityHstVO;
import cmm.util.DataMap;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import egovframework.rte.fdl.cmmn.exception.EgovBizException;

/**
 * CMS 콘텐츠관리에 대한 데이터 접근 클래스를 정의한다
 * @Class Name : CmmCmsDAO.java
 * @author ecplaza 
 * @since 2018-05-11
 * @version 1.0
 * @see
 * 
 * <pre>
 * << 개정이력(Modification Information) >>
 * @
 * @ 수정일		수정자		수정내용
 * @ ---------	---------	-------------------------------
 * @ 2018-05-11	ecplaza		최초생성
 * 
 * </pre>
 */
@Repository("cmmCmsDAO")
public class CmmCmsDAO extends EgovComAbstractDAO {
	
	@SuppressWarnings("unchecked")
	public List<CmmActivityHstVO> selectCmmScrapList(CmmActivityHstVO cmmActivityHstVO) throws DataAccessException{
		return (List<CmmActivityHstVO>)list("cmmCmsDAO.selectCmmScrapList",cmmActivityHstVO);
	}
	@SuppressWarnings("unchecked")
	public List<CmmActivityHstVO> selectCmmActivityHstOpList(CmmActivityHstVO cmmActivityHstVO) throws DataAccessException {
		return (List<CmmActivityHstVO>)list("cmmCmsDAO.selectCmmActivityHstOpList",cmmActivityHstVO);
	}
	@SuppressWarnings("deprecation")
	public int selectCmmScrapListTotCnt(CmmActivityHstVO cmmActivityHstVO) throws DataAccessException {
		//return (Integer)getSqlMapClientTemplate().queryForObject("cmmCmsDAO.selectCmmScrapListTotCnt", cmmActivityHstVO);
		return 0;  // DDDDDDDDDDDdddd 임시 처리 (2021.08.13)
	}
	@SuppressWarnings("deprecation")
	public int selectCmmActivityHstOpListTotCnt(CmmActivityHstVO cmmActivityHstVO) throws DataAccessException {
		//return (Integer)getSqlMapClientTemplate().queryForObject("cmmCmsDAO.selectCmmActivityHstOpListTotCnt", cmmActivityHstVO);
		return 0;  // DDDDDDDDDDDdddd 임시 처리 (2021.08.13)
	}
	@SuppressWarnings("unchecked")
	public List<String> selectCmmCmsKeywordsList(List<Integer> contentId) throws DataAccessException {
		return (List<String>)list("cmmCmsDAO.selectCmmCmsKeywordsList",contentId);
	}
	@SuppressWarnings("unchecked")
	public List<DataMap> selectCmmCmsTagsList(CmmActivityHstVO cmmActivityHstVO) throws DataAccessException {
		return (List<DataMap>)list("cmmCmsDAO.selectCmmCmsTagsList",cmmActivityHstVO);
	}
	@SuppressWarnings("unchecked")
	public List<CmmActivityHstVO> selectCmmCmsPopularList(CmmActivityHstVO cmmActivityHstVO) throws EgovBizException{
		return (List<CmmActivityHstVO>)list("cmmCmsDAO.selectCmmCmsPopularList",cmmActivityHstVO);
	}
	public void deleteAllCmmScrapInfo(CmmActivityHstVO cmmActivityHstVO) throws EgovBizException{
		delete("cmmDAO.deleteCmmScrapInfo", cmmActivityHstVO);
	}
}
