📄 newsdao.java
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -