📄 forumcontentbean.java~1~
字号:
package ws.woa.forum;
import java.io.Serializable;
import java.util.Date;
import ws.woa.util.StrUtil;
/**
* 僼僅乕儔儉偺婰帠傪奿擺偡傞Bean丅
*
* @author Wang
*/
public class ForumContentBean implements Serializable {
private long contentID;
private String subject;
private String content;
private Date addDate;
private Date repDate;
private ForumContentBean[] children = new ForumContentBean[0];
private long userID;
private String userName;
/**
* 巕偺婰帠傪愝掕偟傑偡丅
*/
public void setChildren(ForumContentBean[] children){
this.children = children;
}
/**
* 巕偺婰帠傪庢摼偟傑偡丅
*/
public ForumContentBean[] getChildren(){
return this.children;
}
/**
* Returns the addDate.
* @return Date
*/
public Date getAddDate() {
return addDate;
}
/**
* Returns the content.
* @return String
*/
public String getContent() {
return content;
}
/**
* Returns the contentID.
* @return long
*/
public long getContentID() {
return contentID;
}
/**
* Returns the repDate.
* @return Date
*/
public Date getRepDate() {
return repDate;
}
/**
* Returns the subject.
* @return String
*/
public String getSubject() {
return subject;
}
/**
* Sets the addDate.
* @param addDate The addDate to set
*/
public void setAddDate(Date addDate) {
this.addDate = addDate;
}
/**
* Sets the content.
* @param content The content to set
*/
public void setContent(String content) {
this.content = content;
}
/**
* Sets the contentID.
* @param contentID The contentID to set
*/
public void setContentID(long contentID) {
this.contentID = contentID;
}
/**
* Sets the repDate.
* @param repDate The repDate to set
*/
public void setRepDate(Date repDate) {
this.repDate = repDate;
}
/**
* Sets the subject.
* @param subject The subject to set
*/
public void setSubject(String subject) {
this.subject = subject;
}
/**
* Returns the userID.
* @return long
*/
public long getUserID() {
return userID;
}
/**
* Returns the userName.
* @return String
*/
public String getUserName() {
return userName;
}
/**
* Sets the userID.
* @param userID The userID to set
*/
public void setUserID(long userID) {
this.userID = userID;
}
/**
* Sets the userName.
* @param userName The userName to set
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* 曉怣梡偺審柤傪庢摼偟傑偡丅
*/
public String getResponseSubject(){
String subject = getSubject();
if(subject.startsWith("Re:")){
return subject;
} else {
return "Re: " + subject;
}
}
/**
* 曉怣梡偺杮暥傪庢摼偟傑偡丅
*/
public String getResponseContent(){
return "> " + StrUtil.replace(getContent(),"\r\n","\r\n> ") + "\r\n";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -