newsdao.java
来自「本程序实现了一个新闻发布系统」· Java 代码 · 共 37 行
JAVA
37 行
/*
* 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;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?