001: /*
002: * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/db/PostBean.java,v 1.11 2007/10/09 11:09:19 lexuanttkhtn Exp $
003: * $Author: lexuanttkhtn $
004: * $Revision: 1.11 $
005: * $Date: 2007/10/09 11:09:19 $
006: *
007: * ====================================================================
008: *
009: * Copyright (C) 2002-2007 by MyVietnam.net
010: *
011: * All copyright notices regarding mvnForum MUST remain
012: * intact in the scripts and in the outputted HTML.
013: * The "powered by" text/logo with a link back to
014: * http://www.mvnForum.com and http://www.MyVietnam.net in
015: * the footer of the pages MUST remain visible when the pages
016: * are viewed on the internet or intranet.
017: *
018: * This program is free software; you can redistribute it and/or modify
019: * it under the terms of the GNU General Public License as published by
020: * the Free Software Foundation; either version 2 of the License, or
021: * any later version.
022: *
023: * This program is distributed in the hope that it will be useful,
024: * but WITHOUT ANY WARRANTY; without even the implied warranty of
025: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
026: * GNU General Public License for more details.
027: *
028: * You should have received a copy of the GNU General Public License
029: * along with this program; if not, write to the Free Software
030: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
031: *
032: * Support can be obtained from support forums at:
033: * http://www.mvnForum.com/mvnforum/index
034: *
035: * Correspondence and Marketing Questions can be sent to:
036: * info at MyVietnam net
037: *
038: * @author: Minh Nguyen
039: * @author: Mai Nguyen
040: */
041: package com.mvnforum.db;
042:
043: import java.sql.Timestamp;
044: import java.util.Collection;
045:
046: import net.myvietnam.mvncore.util.StringUtil;
047:
048: /*
049: * Included columns: PostID, ParentPostID, ForumID, ThreadID, MemberID,
050: * MemberName, LastEditMemberName, PostTopic, PostBody, PostCreationDate,
051: * PostLastEditDate, PostCreationIP, PostLastEditIP, PostEditCount, PostFormatOption,
052: * PostOption, PostStatus, PostIcon, PostAttachCount
053: * Excluded columns:
054: */
055: public class PostBean {
056: /*************************************************************************
057: * NOTE: below constants MUST NOT be changed IN ALL CASES,
058: * or it will break the compatibility
059: *************************************************************************/
060: /**
061: * The default value mean post is enable and normal
062: */
063: public final static int POST_STATUS_DEFAULT = 0;
064:
065: /**
066: * The disable post is invisible for normal user and visible to moderator
067: */
068: public final static int POST_STATUS_DISABLED = 1;
069:
070: private int postID;
071: private int parentPostID;
072: private int forumID;
073: private int threadID;
074: private int memberID;
075: private String memberName;
076: private String lastEditMemberName;
077: private String postTopic;
078: private String postBody;
079: private Timestamp postCreationDate;
080: private Timestamp postLastEditDate;
081: private String postCreationIP;
082: private String postLastEditIP;
083: private int postEditCount;
084: private int postFormatOption;
085: private int postOption;
086: private int postStatus;
087: private String postIcon;
088: private int postAttachCount;
089:
090: public int getPostID() {
091: return postID;
092: }
093:
094: public void setPostID(int postID) {
095: this .postID = postID;
096: }
097:
098: public int getParentPostID() {
099: return parentPostID;
100: }
101:
102: public void setParentPostID(int parentPostID) {
103: this .parentPostID = parentPostID;
104: }
105:
106: public int getForumID() {
107: return forumID;
108: }
109:
110: public void setForumID(int forumID) {
111: this .forumID = forumID;
112: }
113:
114: public int getThreadID() {
115: return threadID;
116: }
117:
118: public void setThreadID(int threadID) {
119: this .threadID = threadID;
120: }
121:
122: public int getMemberID() {
123: return memberID;
124: }
125:
126: public void setMemberID(int memberID) {
127: this .memberID = memberID;
128: }
129:
130: public String getMemberName() {
131: return memberName;
132: }
133:
134: public void setMemberName(String memberName) {
135: this .memberName = memberName;
136: }
137:
138: public String getLastEditMemberName() {
139: return lastEditMemberName;
140: }
141:
142: public void setLastEditMemberName(String lastEditMemberName) {
143: this .lastEditMemberName = StringUtil
144: .getEmptyStringIfNull(lastEditMemberName);
145: }
146:
147: public String getPostTopic() {
148: return postTopic;
149: }
150:
151: public void setPostTopic(String postTopic) {
152: this .postTopic = postTopic;
153: }
154:
155: public String getPostBody() {
156: return postBody;
157: }
158:
159: public void setPostBody(String postBody) {
160: this .postBody = postBody;
161: }
162:
163: public Timestamp getPostCreationDate() {
164: return postCreationDate;
165: }
166:
167: public void setPostCreationDate(Timestamp postCreationDate) {
168: this .postCreationDate = postCreationDate;
169: }
170:
171: public Timestamp getPostLastEditDate() {
172: return postLastEditDate;
173: }
174:
175: public void setPostLastEditDate(Timestamp postLastEditDate) {
176: this .postLastEditDate = postLastEditDate;
177: }
178:
179: public String getPostCreationIP() {
180: return postCreationIP;
181: }
182:
183: public void setPostCreationIP(String postCreationIP) {
184: this .postCreationIP = postCreationIP;
185: }
186:
187: public String getPostLastEditIP() {
188: return postLastEditIP;
189: }
190:
191: public void setPostLastEditIP(String postLastEditIP) {
192: this .postLastEditIP = StringUtil
193: .getEmptyStringIfNull(postLastEditIP);
194: }
195:
196: public int getPostEditCount() {
197: return postEditCount;
198: }
199:
200: public void setPostEditCount(int postEditCount) {
201: this .postEditCount = postEditCount;
202: }
203:
204: public int getPostFormatOption() {
205: return postFormatOption;
206: }
207:
208: public void setPostFormatOption(int postFormatOption) {
209: this .postFormatOption = postFormatOption;
210: }
211:
212: public int getPostOption() {
213: return postOption;
214: }
215:
216: public void setPostOption(int postOption) {
217: this .postOption = postOption;
218: }
219:
220: public int getPostStatus() {
221: return postStatus;
222: }
223:
224: public void setPostStatus(int postStatus) {
225: this .postStatus = postStatus;
226: }
227:
228: public String getPostIcon() {
229: return postIcon;
230: }
231:
232: public void setPostIcon(String postIcon) {
233: this .postIcon = StringUtil.getEmptyStringIfNull(postIcon);
234: }
235:
236: public int getPostAttachCount() {
237: return postAttachCount;
238: }
239:
240: public void setPostAttachCount(int postAttachCount) {
241: this .postAttachCount = postAttachCount;
242: }
243:
244: /************************************************
245: * Customized methods come below
246: ************************************************/
247: private MemberBean memberBean = null;
248: private Collection attachmentBeans = null;
249:
250: public MemberBean getMemberBean() {
251: return memberBean;
252: }
253:
254: public void setMemberBean(MemberBean memberBean) {
255: this .memberBean = memberBean;
256: }
257:
258: public Collection getAttachmentBeans() {
259: return attachmentBeans;
260: }
261:
262: public void setAttachmentBeans(Collection attachmentBeans) {
263: this .attachmentBeans = attachmentBeans;
264: }
265:
266: } //end of class PostBean
|