?? _readingbean.java
字號:
/*
* _ReadingBean.java
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Author: Winter Lau
* http://dlog4j.sourceforge.net
*/
package com.liusoft.dlog4j.base;
import java.util.Date;
import java.util.List;
import com.liusoft.dlog4j.beans.UserBean;
import com.liusoft.dlog4j.util.StringUtils;
/**
* 閱讀對象的基類,例如日記/照片/話題
* @see com.liusoft.dlog4j.base._DiaryBase
* @see com.liusoft.dlog4j.base._PhotoBase
* @see com.liusoft.dlog4j.base._TopicBeanBase
* @author liudong
*/
public abstract class _ReadingBean extends _MultipleSiteEnabledBean {
private UserBean owner; //對象所有者
private String title; //對象標(biāo)題
private String keyword; //關(guān)鍵字,Tag,Keyword
private Date modifyTime; //最近一次修改時間
private int viewCount; //閱讀次數(shù)
private int replyCount; //評論數(shù)
private Date createTime; //創(chuàng)建時間
private Date lastReplyTime; //最后一次評論時間
private Date lastReadTime; //最后一次閱讀時間
private int status; //對象狀態(tài)
private List tags; //標(biāo)簽
private List replies; //評論
protected ClientInfo client;
public List getKeywords() {
return StringUtils.stringToList(keyword);
}
public int getReplyCount() {
return replyCount;
}
public void setReplyCount(int replyCount) {
this.replyCount = replyCount;
}
public int getViewCount() {
return viewCount;
}
public void setViewCount(int viewCount) {
this.viewCount = viewCount;
}
public int incReplyCount(int count){
this.replyCount += count;
if(this.replyCount<0)
this.replyCount = 0;
return this.replyCount;
}
public int incViewCount(int count){
this.viewCount += count;
if(this.viewCount<0)
this.viewCount = 0;
return this.viewCount;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public UserBean getOwner() {
return owner;
}
public void setOwner(UserBean owner) {
this.owner = owner;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getLastReadTime() {
return lastReadTime;
}
public void setLastReadTime(Date lastReadTime) {
this.lastReadTime = lastReadTime;
}
public Date getLastReplyTime() {
return lastReplyTime;
}
public void setLastReplyTime(Date lastReplyTime) {
this.lastReplyTime = lastReplyTime;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public List getReplies() {
return replies;
}
public void setReplies(List replies) {
this.replies = replies;
}
public List getTags() {
return tags;
}
public void setTags(List tags) {
this.tags = tags;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public ClientInfo getClient() {
if(client==null)
client = new ClientInfo();
return client;
}
public void setClient(ClientInfo client) {
this.client = client;
}
public String getClientAddr() {
return getClient().getAddr();
}
public int getClientType() {
return getClient().getType();
}
public String getUserAgent() {
return getClient().getUserAgent();
}
public void setClientAddr(String addr) {
getClient().setAddr(addr);
}
public void setClientType(int type) {
getClient().setType(type);
}
public void setUserAgent(String userAgent) {
getClient().setUserAgent(userAgent);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -