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