本书由浅入深、循序渐进地介绍了MVC的体系结构和如何构建一个基于MVC的Web框架

源代码在线查看: content.java

软件大小: 9605 K
上传用户: C69222090
关键词: MVC Web
下载地址: 免注册下载 普通下载 VIP

相关代码

				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);
					}
				}
							

相关资源