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

📄 upfiledao.java

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

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

/**
 * <p>Title:系统上传文件的相关操作接口</p>
 * <li>上传文件与数据库相关的各项操作</li>
 * <b>CopyRight: yyhweb[由由华网]</b>
 * @author stephen
 * @version YH-2.0
 */
public interface UpFileDao {
	
	
	/** 删除一个文件
	 * @param id 文件Id
	 * @return 成功:ture  失败:false
	 * @throws SQLException
	 */
	public abstract boolean delOneFile(int id) throws SQLException;
	
	/** 删除帖子所有文件
	 * @param artId 帖子Id
	 * @return 成功:ture  失败:false
	 * @throws SQLException
	 */
	public abstract boolean delArtFile(int artId) throws SQLException;
	
	/** 取得系统文件最大Id
	 * @return 系统文件最大Id
	 * @throws SQLException
	 */
	public abstract int getFileMaxId() throws SQLException;
	
	/** 当文件被下载一次,其下载次数就要加一。
	 * @param id 文章Id
	 * @throws SQLException
	 */
	public abstract void downAddTime(int id) throws SQLException;
	
	/** 取得用户文件数
	 * @param userId 用户Id
	 * @return 用户文件数
	 * @throws SQLException
	 */
	public abstract int getUserFileCount(int userId) throws SQLException;
	
	/** 取得用户文件总大小
	 * @param userId 用户Id
	 * @return 用户文件总大小
	 * @throws SQLException
	 */
	public abstract int getUserFileSize(int userId) throws SQLException;

	/** 取得系统某段区间内的所有附件(按照录入的时间反排序)
	 * @param sizeMap (userid,start,end)
	 * @return 某栏目的所有附件DTO对象
	 * @throws SQLException
	 */
	public abstract List getUserFiles(HashMap sizeMap) throws SQLException;
	
	/** 根据帖子Id和用户Id,取得该用户发表某帖子时所有上传附件(包括以上传但未发表的)
	 * @param artId 帖子Id
	 * @param userId 用户Id
	 * @return List 附件列表 
	 * @throws SQLException
	 */
	public abstract List getArtFiles(int artId,int userId) throws SQLException;
	
	/** 上传一个文件
	 * @param file 文件
	 * @throws SQLException
	 */
	public abstract void upLoadFile(UpFile file) throws SQLException;
	
	/** 发表文章时,更新该文章相关附件的文章Id。
	 * @param artid 文章Id
	 * @param userid 用户Id
	 * @throws SQLException
	 */
	public abstract void postArtFiles(int artid,int userid) throws SQLException;
	
}

⌨️ 快捷键说明

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