001: /*
002: * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/db/MessageBean.java,v 1.16 2007/10/09 11:09:19 lexuanttkhtn Exp $
003: * $Author: lexuanttkhtn $
004: * $Revision: 1.16 $
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: MessageID, FolderName, MemberID, MessageSenderID, MessageSenderName,
050: * MessageToList, MessageCcList, MessageBccList, MessageTopic, MessageBody,
051: * MessageType, MessageOption, MessageStatus, MessageReadStatus, MessageNotify,
052: * MessageIcon, MessageAttachCount, MessageIP, MessageCreationDate
053: * Excluded columns:
054: */
055: public class MessageBean {
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 means this message has NOT been read
062: */
063: public final static int MESSAGE_READ_STATUS_DEFAULT = 0;
064:
065: /**
066: * This value means this message has been read
067: */
068: public final static int MESSAGE_READ_STATUS_READ = 1;
069:
070: /**
071: * The default value means this message type is normal
072: */
073: public final static int MESSAGE_TYPE_DEFAULT = 0;
074:
075: /**
076: * This value means this message has been mark as Quote [Marco]
077: */
078: public final static int MESSAGE_TYPE_QUOTE = 1;
079:
080: /**
081: * This value means this message is a public message
082: */
083: public final static int MESSAGE_TYPE_PUBLIC = 2;
084:
085: private int messageID;
086: private String folderName;
087: private int memberID;
088: private int messageSenderID;
089: private String messageSenderName;
090: private String messageToList;
091: private String messageCcList;
092: private String messageBccList;
093: private String messageTopic;
094: private String messageBody;
095: private int messageType;
096: private int messageOption;
097: private int messageStatus;
098: private int messageReadStatus;
099: private int messageNotify;
100: private String messageIcon;
101: private int messageAttachCount;
102: private String messageIP;
103: private Timestamp messageCreationDate;
104:
105: public int getMessageID() {
106: return messageID;
107: }
108:
109: public void setMessageID(int messageID) {
110: this .messageID = messageID;
111: }
112:
113: public String getFolderName() {
114: return folderName;
115: }
116:
117: public void setFolderName(String folderName) {
118: this .folderName = folderName;
119: }
120:
121: public int getMemberID() {
122: return memberID;
123: }
124:
125: public void setMemberID(int memberID) {
126: this .memberID = memberID;
127: }
128:
129: public int getMessageSenderID() {
130: return messageSenderID;
131: }
132:
133: public void setMessageSenderID(int messageSenderID) {
134: this .messageSenderID = messageSenderID;
135: }
136:
137: public String getMessageSenderName() {
138: return messageSenderName;
139: }
140:
141: public void setMessageSenderName(String messageSenderName) {
142: this .messageSenderName = messageSenderName;
143: }
144:
145: public String getMessageToList() {
146: return messageToList;
147: }
148:
149: public void setMessageToList(String messageToList) {
150: this .messageToList = StringUtil
151: .getEmptyStringIfNull(messageToList);
152: }
153:
154: public String getMessageCcList() {
155: return messageCcList;
156: }
157:
158: public void setMessageCcList(String messageCcList) {
159: this .messageCcList = StringUtil
160: .getEmptyStringIfNull(messageCcList);
161: }
162:
163: public String getMessageBccList() {
164: return messageBccList;
165: }
166:
167: public void setMessageBccList(String messageBccList) {
168: this .messageBccList = StringUtil
169: .getEmptyStringIfNull(messageBccList);
170: }
171:
172: public String getMessageTopic() {
173: return messageTopic;
174: }
175:
176: public void setMessageTopic(String messageTopic) {
177: this .messageTopic = StringUtil
178: .getEmptyStringIfNull(messageTopic);
179: }
180:
181: public String getMessageBody() {
182: return messageBody;
183: }
184:
185: public void setMessageBody(String messageBody) {
186: this .messageBody = StringUtil.getEmptyStringIfNull(messageBody);
187: }
188:
189: public int getMessageType() {
190: return messageType;
191: }
192:
193: public void setMessageType(int messageType) {
194: this .messageType = messageType;
195: }
196:
197: public int getMessageOption() {
198: return messageOption;
199: }
200:
201: public void setMessageOption(int messageOption) {
202: this .messageOption = messageOption;
203: }
204:
205: public int getMessageStatus() {
206: return messageStatus;
207: }
208:
209: public void setMessageStatus(int messageStatus) {
210: this .messageStatus = messageStatus;
211: }
212:
213: public int getMessageReadStatus() {
214: return messageReadStatus;
215: }
216:
217: public void setMessageReadStatus(int messageReadStatus) {
218: this .messageReadStatus = messageReadStatus;
219: }
220:
221: public int getMessageNotify() {
222: return messageNotify;
223: }
224:
225: public void setMessageNotify(int messageNotify) {
226: this .messageNotify = messageNotify;
227: }
228:
229: public String getMessageIcon() {
230: return messageIcon;
231: }
232:
233: public void setMessageIcon(String messageIcon) {
234: this .messageIcon = StringUtil.getEmptyStringIfNull(messageIcon);
235: }
236:
237: public int getMessageAttachCount() {
238: return messageAttachCount;
239: }
240:
241: public void setMessageAttachCount(int messageAttachCount) {
242: this .messageAttachCount = messageAttachCount;
243: }
244:
245: public String getMessageIP() {
246: return messageIP;
247: }
248:
249: public void setMessageIP(String messageIP) {
250: this .messageIP = messageIP;
251: }
252:
253: public Timestamp getMessageCreationDate() {
254: return messageCreationDate;
255: }
256:
257: public void setMessageCreationDate(Timestamp messageCreationDate) {
258: this .messageCreationDate = messageCreationDate;
259: }
260:
261: /************************************************
262: * Customized methods come below
263: ************************************************/
264: private MemberBean memberBean = null;
265: private Collection attachmentBeans = null;
266:
267: public MemberBean getMemberBean() {
268: return memberBean;
269: }
270:
271: public void setMemberBean(MemberBean memberBean) {
272: this .memberBean = memberBean;
273: }
274:
275: public Collection getAttachmentBeans() {
276: return attachmentBeans;
277: }
278:
279: public void setAttachmentBeans(Collection attachmentBeans) {
280: this .attachmentBeans = attachmentBeans;
281: }
282:
283: } //end of class MessageBean
|