⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msgdao.java

📁 一个不错的bbs论坛系统.对初学者很有帮助
💻 JAVA
字号:
package com.yhbbs.message.itface;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

/**
 * <p>Title:论坛消息数据存取模块Interface</p>
 * <li>	论坛短消息数据存取模块 <br>
 * <li>	论坛注册,帖子删除移动短消息数据存取模块 <br>
 * <br><b>WebSite: www.yyhweb.com</b>
 * <br><b>CopyRight: yhbbs[永恒论坛]</b>
 * @author stephen
 * @version YH-1.0
 */
public interface MsgDao {
	
	/** 取得用户注册条款消息模版
	 * @return Templet 消息
	 * @throws SQLException
	 */
	public abstract Templet getRegTemplet() throws SQLException;
	
	/** 取得用户注册成功后要发送给用户的消息
	 * @return Templet 消息
	 * @throws SQLException
	 */
	public abstract Templet getRegMessage() throws SQLException;

	/** 取得移动帖子后系统发送给用户的消息
	 * @return Templet 消息
	 * @throws SQLException
	 */
	public abstract Templet getMoveMessage() throws SQLException;
	
	/** 删除文章后系统发送给用户的消息
	 * @return Message 消息
	 * @throws SQLException
	 */
	public abstract Templet getDeleteMessage() throws SQLException;
	
	/** 发送短消息
	 * @param msg 短消息
	 * @throws SQLException
	 */
	public abstract void addMessage(Message msg) throws SQLException;
	
	/** 删除短消息
	 * @param msgId 短消息Id
	 * @param i 0:发送 1:接受 2:删除
	 * @throws SQLException
	 */
	public abstract void deleteMessage(int msgId,int i) throws SQLException;
	
	/** 取得用户发件箱列表
	 * @param map 用户Id,查询位置和长度
	 * @param i 0:发送的短消息 1:受到的短消息
	 * @return 发件箱短消息列表
	 * @throws SQLException
	 */
	public abstract List getMsgs(HashMap map,int i) throws SQLException;
	
	/** 取得用户短消息数
	 * @param userId 用户Id
	 * @param i 0:发送 1:接受 2:最新 3:所有
	 * @return 发送短消息数
	 * @throws SQLException
	 */
	public abstract int getMsgCounts(int userId,int i) throws SQLException;
	
	/** 用户短消息统计
	 * @param userId 用户Id
	 * @return MsgCount 短消息统计
	 * @throws SQLException
	 */
	public abstract MsgCount getMsgCount(int userId) throws SQLException;
	
	/** 由ID取得短消息
	 * @param msgId 消息Id
	 * @return Message 短消息
	 * @throws SQLException
	 */
	public abstract Message getMessage(int msgId) throws SQLException;
	
	/** 更新短消息为已读
	 * @param msgId 消息Id
	 * @throws SQLException
	 */
	public abstract void ReadMessage(int msgId) throws SQLException;
	
	// 后台管理使用
	/**
	 * @param i 更新模版类型 
     * 0:注册协议、1:注册消息、2:移动消息、3:删除消息模版
	 * @param templet 模版
	 * @return true:成功 false:失败
	 * @throws SQLException
	 */
	public abstract boolean updateTemplet(int i,Templet templet) throws SQLException;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -