📄 forumdao.java
字号:
package com.yhbbs.forum.itface;
import java.sql.SQLException;
import java.util.List;
/**
* <p>Title:论坛数据存取模块Interface</p>
* <li> 论坛数据存取模块
* <br><b>WebSite: www.yyhweb.com</b>
* <br><b>CopyRight: yyhweb[由由华网]</b>
* @author stephen
* @version YHBBS-2.0
*/
public interface ForumDao {
/** 取得所有论坛Id
* @return 论坛Id列表
* @throws SQLException
*/
public abstract List getAllForumId() throws SQLException;
/** 取得某论坛名字
* @param forumId 论坛Id
* @return 论坛名字
* @throws SQLException
*/
public abstract String getForumName(int forumId) throws SQLException;
/** 取得某论坛的区论坛ID
* @param forumId 论坛Id
* @return 论坛所属区论坛ID
* @throws SQLException
*/
public abstract int getForumClassId(int forumId) throws SQLException;
/** 取得某论坛最新帖子Id
* @param forumId 论坛Id
* @return 最新帖子Id
* @throws SQLException
*/
public abstract int getForumLArtId(int forumId) throws SQLException;
/** 更新论坛最新帖子标题
* <li>当更新帖子时如该帖为论坛最新帖子,则需要更新其标题
* @param forum 论坛信息(Id\名称)
* @throws SQLException
*/
public abstract void upForumLArtTitle(ForumJump forum) throws SQLException;
/** 增加一个论坛
* @param forum 论坛
* @throws SQLException
*/
public abstract void addForum(Forum forum) throws SQLException;
/** 更新一个论坛
* @param forum 论坛
* @return true:成功 false:失败
* @throws SQLException
*/
public abstract boolean editForum(Forum forum) throws SQLException;
/** 删除一个论坛
* @param forumId 论坛Id
* @return true:成功 false:失败
* @throws SQLException
*/
public abstract boolean deleteForum(int forumId) throws SQLException;
/** 取得论坛管理员
* @param forumId 论坛Id
* @return 论坛管理员
* @throws SQLException
*/
public abstract String getForumadmin(int forumId) throws SQLException;
/** 取得系统所有论坛的id,today,yesterday,lastposttime
* @return list 所有论坛
* @throws SQLException
*/
public abstract List getAllForums() throws SQLException;
/** 更新论坛的今天、昨天帖子统计信息
* @param forumId 论坛Id
* @throws SQLException
*/
public abstract void upYesdayCount(int forumId) throws SQLException;
/** 当论坛发表帖子,需要更新论坛最新统计信息
* @param fArtPost 论坛需要更新的属性
* @param flag true:主题贴 false:回复贴
* @throws SQLException
*/
public abstract void forumPostArt(ForumArtPost fArtPost,boolean flag) throws SQLException;
/** 有帖子移动到本论坛,需要更新论坛最新统计信息
* @param fArtPost 论坛需要更新的属性
* @param istoday true:今日帖 false:非今日贴
* @throws SQLException
*/
public abstract void forumMoveArt(ForumArtPost fArtPost,boolean istoday) throws SQLException;
/** 当论坛删除帖子,需要更新论坛最新统计信息
* @param fArtDel 论坛需要更新的属性
* @param flag true:主题贴 false:回复贴
* @param istoday true:今日帖 false:非今日贴
* @throws SQLException
*/
public abstract void forumDelArt(ForumArtPost fArtDel,boolean flag,boolean istoday) throws SQLException;
/** 当论坛删除帖子,需要更新论坛贴子统计信息
* @param forumId 论坛Id
* @param flag true:主题贴 false:回复贴
* @param istoday true:今日帖 false:非今日贴
* @throws SQLException
*/
public abstract void delArticle(int forumId,boolean flag,boolean istoday) throws SQLException;
// 后台管理用
/** 由论坛ID取得某论坛
* @param id 论坛ID
* @return Forum 论坛
* @throws SQLException
*/
public abstract Forum getForumById(int id) throws SQLException;
/** 移动论坛
* @param forumId 论坛Id
* @param classId 目标区论坛Id
* @return true:成功 false:失败
* @throws SQLException
*/
public abstract boolean moveForum(int forumId,int classId) throws SQLException;
/** 取得论坛最大Id
* @return 论坛最大Id
* @throws SQLException
*/
public abstract int getForumMaxId() throws SQLException;
/** 取得某区论坛最大排序
* @param classId 区论坛Id
* @return 最大排序
* @throws SQLException
*/
public abstract int getForumMaxSort(int classId) throws SQLException;
/** 增加一个论坛版主
* @param forumId 论坛Id
* @param forumAdmin 论坛版主
* @return true:成功 false:失败
* @throws SQLException
*/
public abstract boolean addForumadmin(int forumId,String forumAdmin) throws SQLException;
/** 论坛排序
* @param forumId 论坛Id
* @param forumSort 论坛顺序
* @return true:成功 false:失败
* @throws SQLException
*/
public abstract boolean forumSort(int forumId,int forumSort) throws SQLException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -