KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > dlog4j > formbean > MessageForm


1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Library General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15  */

16 package dlog4j.formbean;
17
18 import java.util.Date JavaDoc;
19
20 /**
21  * 点对点消息对象
22  * @author Liudong
23  */

24 public class MessageForm extends DlogActionForm {
25     
26     public final static int STATUS_NEW = 0x00; //新信息
27
public final static int STATUS_READ = 0x01; //已读
28
public final static int STATUS_DELETE = 0x02;//已删除
29

30     int id;
31     UserForm fromUser;
32     UserForm toUser;
33     String JavaDoc content;
34     Date JavaDoc sendTime;
35     Date JavaDoc readTime;
36     int status;
37     int isHtml;
38
39     public String JavaDoc getContent() {
40         return content;
41     }
42     public void setContent(String JavaDoc content) {
43         this.content = content;
44     }
45     public UserForm getFromUser() {
46         return fromUser;
47     }
48     public void setFromUser(UserForm fromUser) {
49         this.fromUser = fromUser;
50     }
51     public Date JavaDoc getSendTime() {
52         return sendTime;
53     }
54     public String JavaDoc getSendTimeOutput() {
55         if(sendTime==null)
56             return "[无发送时间]";
57         return df1.format(sendTime);
58     }
59     public void setSendTime(Date JavaDoc sendTime) {
60         this.sendTime = sendTime;
61     }
62     public UserForm getToUser() {
63         return toUser;
64     }
65     public void setToUser(UserForm toUser) {
66         this.toUser = toUser;
67     }
68     public void setToUserId(int toUser) {
69         if(this.toUser==null)
70             this.toUser = new UserForm();
71         this.toUser.setId(toUser);
72     }
73     public int getStatus() {
74         return status;
75     }
76     public void setStatus(int status) {
77         this.status = status;
78     }
79     public int getId() {
80         return id;
81     }
82     public void setId(int id) {
83         this.id = id;
84     }
85     public int getIsHtml() {
86         return isHtml;
87     }
88     public void setIsHtml(int isHtml) {
89         this.isHtml = isHtml;
90     }
91     public Date JavaDoc getReadTime() {
92         return readTime;
93     }
94     public void setReadTime(Date JavaDoc readTime) {
95         this.readTime = readTime;
96     }
97 }
98
Popular Tags