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

📄 content.java

📁 本书由浅入深、循序渐进地介绍了MVC的体系结构和如何构建一个基于MVC的Web框架
💻 JAVA
字号:
package com.myContent.vo;

public class Content {
	public Content() {
	}
	//定义变量
	private int id = 0;
	private String title = "";
	private String content = "";
	private int userId = 0;
	private String dateTime = "";
	private int contentTypeId = 0;
	public String validate() {
		String msg = "";
		if ("".equals(this.title) || "".equals(this.content) || "".equals(this.contentTypeId)) {
			msg = "内容标题、正文、内容类别不能为空";
		}
		return msg;
	}
	/**
	 * @return the content
	 */
	public String getContent() {
		return content;
	}
	/**
	 * @param content the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}
	/**
	 * @return the contentTypeId
	 */
	public int getContentTypeId() {
		return contentTypeId;
	}
	/**
	 * @param contentTypeId the contentTypeId to set
	 */
	public void setContentTypeId(int contentTypeId) {
		this.contentTypeId = contentTypeId;
	}
	/**
	 * @param contentTypeId the contentTypeId to set
	 */
	public void setContentTypeId(String contentTypeId) {
		this.contentTypeId = Integer.parseInt(contentTypeId);
	}
	/**
	 * @return the dateTime
	 */
	public String getDateTime() {
		return dateTime;
	}
	/**
	 * @param dateTime the dateTime to set
	 */
	public void setDateTime(String dateTime) {
		this.dateTime = dateTime;
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	
	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = Integer.parseInt(id);
	}
	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}
	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}
	/**
	 * @return the userId
	 */
	public int getUserId() {
		return userId;
	}
	/**
	 * @param userId the userId to set
	 */
	public void setUserId(int userId) {
		this.userId = userId;
	}
	/**
	 * @param userId the userId to set
	 */
	public void setUserId(String userId) {
		this.userId = Integer.parseInt(userId);
	}
}

⌨️ 快捷键说明

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