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

📄 fileinfo.java

📁 辅助办公系统,具有发布公告、站内邮箱、日程安排、日志查看等功能
💻 JAVA
字号:
package com.x3408.download;

import java.text.SimpleDateFormat;
import java.util.Date;

public class FileInfo {
	private int fileID=0;

	private String name;

	private String upLoadPath;

	private String caption;

	private String introduce;
	
	private String upLoadTime;

	public FileInfo() {

	}

	public FileInfo(String pFileID, String pName, String pUpLoadPath,
			String pCaption, String pIntroduce,String pUpLoadTime) {
		this.setFileID(pFileID);
		this.setName(pName);
		this.setUpLoadPath(pUpLoadPath);
		this.setCaption(pCaption);
		this.setIntroduce(pIntroduce);
		this.setUpLoadTime(pUpLoadTime);
	}
	
	public FileInfo(String pName,String pUpLoadPath,String pCaption,String pIntroduce){
		this.setName(pName);
		this.setUpLoadPath(pUpLoadPath);
		this.setCaption(pCaption);
		this.setIntroduce(pIntroduce);
		this.setUpLoadTime();
	}

	public boolean isValid() {
		if (this.name == null || "".equals(this.name)
				|| this.upLoadPath == null || "".equals(this.upLoadPath)
				|| this.caption == null || "".equals(this.caption)
				|| this.introduce == null || "".equals(this.introduce)
				||this.upLoadTime==null||"".equals(this.upLoadTime)) {
			return false;
		}
		return true;
	}

	public int getFileID() {
		return this.fileID;
	}

	public String getName() {
		return this.name;
	}

	public String getUpLoadPath() {
		return this.upLoadPath;
	}

	public String getCaption() {
		return this.caption;
	}

	public String getIntroduce() {
		return this.introduce;
	}
	public String getUpLoadTime(){
		return this.upLoadTime;
	}
	public void setFileID(String pFileID) {
		try {
			this.fileID = Integer.parseInt(pFileID);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void setName(String pName) {
		this.name = pName==null?null:pName.trim();
	}

	public void setUpLoadPath(String pUpLoadPath) {
		this.upLoadPath = pUpLoadPath==null?null:pUpLoadPath.trim();
	}

	public void setCaption(String pCaption) {
		this.caption = pCaption==null?null:pCaption.trim();
	}

	public void setIntroduce(String pIntroduce) {
		this.introduce = pIntroduce==null||pIntroduce.length()<501?pIntroduce:pIntroduce.substring(0,499);
	}
	public void setUpLoadTime(){
		this.upLoadTime=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date());
	}
	public void setUpLoadTime(String pUpLoadTime){
		this.upLoadTime=pUpLoadTime;
	}
}

⌨️ 快捷键说明

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