NewsCommentDAO.java
上传用户:junmaots
上传日期:2022-07-09
资源大小:2450k
文件大小:1k
- package com.mycompany.news.dao;
- import java.sql.Connection;
- import java.sql.SQLException;
- import java.util.List;
- import com.mycompany.news.dto.News;
- import com.mycompany.news.dto.NewsComment;
- public interface NewsCommentDAO {
- /**
- * 添加评论
- * @param comment
- * @return
- * @throws Exception
- */
- public boolean addNewsComment(NewsComment comment) throws Exception;
- /**
- * 删除评论
- * @param comment
- * @return
- * @throws Exception
- */
- public boolean deleteNewsComment(NewsComment comment) throws Exception;
- /**
- * 删除某新闻的所有评论
- * @param news
- * @return
- * @throws Exception
- */
- public boolean deleteCommentByNews(News news)throws Exception;
- /**
- * 取得分页评论
- * @param news
- * @param pageNo
- * @param pageSize
- * @return
- * @throws Exception
- */
- public List getNewsComment(News news,int pageNo,int pageSize) throws Exception;
- /**
- * 分页取得所有已审核评论
- * @param news
- * @param pageNo
- * @param pageSize
- * @return
- * @throws Exception
- */
- public List listPublicComment(News news,int pageNo,int pageSize) throws Exception;
-
- public Connection getConnection();
-
- public void setConnection(Connection conn);
- /**
- * 审核评论
- * @param comment
- * @return
- * @throws SQLException
- */
- public boolean auditComment(NewsComment comment) throws SQLException;
- }