NewsDAO.java
上传用户:junmaots
上传日期:2022-07-09
资源大小:2450k
文件大小:1k
- /*
- * Created on 2005-11-10
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
- package com.mycompany.news.dao;
- import java.sql.Connection;
- import java.sql.SQLException;
- import java.util.List;
- import com.mycompany.news.dto.News;
- /**
- * @author Administrator
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
- public interface NewsDAO {
- public void addNews(News News)throws Exception;//添加News信息
- public void updateNews(News News)throws Exception;//修改News信息
- public void deleteNews(News News)throws Exception;//删除News信息
- public List listAllNews()throws Exception;//列出所有的News信息
- public List listNews(News NewsCondition,int curPage,int perpage)throws Exception;//组合条件查询
- public News getByID(long id)throws Exception;//根据主键获取对象
- public void setConnection(Connection conn);
- public Connection getConnection();
- public void recommendNews(long news)throws Exception;
- public void cancelRecommend(long news)throws Exception;
- public List getRecommendedNews(long channelid, int max, int max2) throws Exception;
- public int getRecommendedNewsCount(long channelid) throws Exception;
- public Long getCurrentID() throws SQLException;
- public void updateVisitCount(long newsid) throws Exception;
- }