KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > geinuke > vo > CommentVO


1
2  /*
3  -- GeiNuke --
4 Copyright (c) 2005 by Roberto Sidoti [geinuke@users.sourceforge.net]
5  http://www.hostingjava.it/-geinuke/
6
7 This file is part of GeiNuke.
8
9     GeiNuke is free software; you can redistribute it and/or modify
10     it under the terms of the GNU General Public License as published by
11     the Free Software Foundation; either version 2 of the License, or
12     (at your option) any later version.
13
14     GeiNuke is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17     GNU General Public License for more details.
18
19     You should have received a copy of the GNU General Public License
20     along with GeiNuke; if not, write to the Free Software
21     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */

23 package com.geinuke.vo;
24
25 import java.io.Serializable JavaDoc;
26 import java.util.Date JavaDoc;
27 import java.util.GregorianCalendar JavaDoc;
28
29 /*
30  CREATE TABLE `COMMENT` (
31   `CID` int(11) NOT NULL auto_increment,
32   `XID` int(30) NOT NULL,
33   `LINK` int(30) NOT NULL DEFAULT 0,
34   `COMTYPE` VARCHAR(50) NOT NULL DEFAULT '',
35   `SUBJECT` VARCHAR(50) NOT NULL DEFAULT '',
36   `TEXT` mediumtext NOT NULL,
37   `TIME` BIGINT(20) NOT NULL DEFAULT '0',
38    PRIMARY KEY (`CID`)
39 )
40  */

41
42 public class CommentVO implements Serializable JavaDoc{
43     public static final String JavaDoc CAT_NEWS="NEWS";
44     public static final String JavaDoc CAT_WIKI="WIKI";
45     public static final String JavaDoc CAT_FORUMS="FORUMS";
46     public static final String JavaDoc CAT_BLOG="BLOG";
47     protected int CId=-1;
48     protected int XId=-1;
49     protected int UId=1;
50     protected int link=-1;
51     protected String JavaDoc comType=null;
52     protected String JavaDoc subject=null;
53     protected String JavaDoc text=null;
54     protected long time=0;
55
56
57     
58     /**
59      * @return Returns the cId.
60      */

61     public int getCId() {
62         return CId;
63     }
64     /**
65      * @param id The cId to set.
66      */

67     public void setCId(int id) {
68         CId = id;
69     }
70     /**
71      * @return Returns the comType.
72      */

73     public String JavaDoc getComType() {
74         return comType;
75     }
76     /**
77      * @param comType The comType to set.
78      */

79     public void setComType(String JavaDoc comType) {
80         this.comType = comType;
81     }
82     /**
83      * @return Returns the link.
84      */

85     public int getLink() {
86         return link;
87     }
88     /**
89      * @param link The link to set.
90      */

91     public void setLink(int link) {
92         this.link = link;
93     }
94     /**
95      * @return Returns the subject.
96      */

97     public String JavaDoc getSubject() {
98         return subject;
99     }
100     /**
101      * @param subject The subject to set.
102      */

103     public void setSubject(String JavaDoc subject) {
104         this.subject = subject;
105     }
106     /**
107      * @return Returns the text.
108      */

109     public String JavaDoc getText() {
110         return text;
111     }
112     /**
113      * @param text The text to set.
114      */

115     public void setText(String JavaDoc text) {
116         this.text = text;
117     }
118     /**
119      * @return Returns the time.
120      */

121     public long getTime() {
122         return time;
123     }
124     /**
125      * @param time The time to set.
126      */

127     public void setTime(long time) {
128         this.time = time;
129     }
130     /**
131      * @return Returns the xId.
132      */

133     public int getXId() {
134         return XId;
135     }
136     /**
137      * @param id The xId to set.
138      */

139     public void setXId(int id) {
140         XId = id;
141     }
142     
143     public GregorianCalendar JavaDoc getDateTime() {
144         GregorianCalendar JavaDoc gc=null;
145         Date JavaDoc d=new Date JavaDoc(this.time);
146         gc=new GregorianCalendar JavaDoc();
147         gc.setTime(d);
148         
149         
150         return gc;
151     }
152     /**
153      * @return Returns the uId.
154      */

155     public int getUId() {
156         return UId;
157     }
158     /**
159      * @param id The uId to set.
160      */

161     public void setUId(int id) {
162         UId = id;
163     }
164 }
165
Popular Tags