KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > impl > PostImpl


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under LGPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portlet.forums.impl;
12
13 import java.io.Serializable JavaDoc;
14 import java.util.Date JavaDoc;
15
16 import org.jboss.portal.core.model.User;
17 import org.jboss.portlet.forums.model.Message;
18 import org.jboss.portlet.forums.model.Post;
19 import org.jboss.portlet.forums.model.Poster;
20 import org.jboss.portlet.forums.model.Topic;
21
22 /**
23  * @hibernate.class table="jbp_forums_posts"
24  *
25  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
26  * @author <a HREF="mailto:theute@jboss.org">Thomas Heute</a>
27  * @version $Revision: 1.5 $
28  */

29 public class PostImpl
30    implements Serializable JavaDoc,
31               Post
32 {
33    private Topic topic;
34    private User user;
35    private int count;
36    private Date JavaDoc date;
37    private Integer JavaDoc id;
38    private Date JavaDoc createDate;
39    private Message message;
40    private Poster poster;
41
42    /**
43     * Creates a new {@link PostImpl} object.
44     */

45    public PostImpl()
46    {
47    }
48
49    /**
50     * @hibernate.many-to-one
51     * column="jbp_topic_id"
52     * class="org.jboss.portlet.forums.impl.TopicImpl"
53     */

54    public Topic getTopic()
55    {
56       return topic;
57    }
58
59    /**
60     * DOCUMENT_ME
61     *
62     * @param topic DOCUMENT_ME
63     */

64    public void setTopic(Topic topic)
65    {
66       this.topic = topic;
67    }
68
69    /**
70     * DOCUMENT_ME
71     *
72     * @return DOCUMENT_ME
73     */

74    public User getUser()
75    {
76       return user;
77    }
78
79    /**
80     * DOCUMENT_ME
81     *
82     * @param user DOCUMENT_ME
83     */

84    public void setUser(User user)
85    {
86       this.user = user;
87    }
88
89    /**
90     * @hibernate.property
91     * column="jbp_edit_count"
92     * unique="false"
93     * update="true"
94     */

95    public int getEditCount()
96    {
97       return count;
98    }
99
100    /**
101     * DOCUMENT_ME
102     *
103     * @param count DOCUMENT_ME
104     */

105    public void setEditCount(int count)
106    {
107       this.count = count;
108    }
109
110    /**
111     * @hibernate.property
112     * column="jbp_edit_date"
113     * unique="false"
114     * update="true"
115     */

116    public Date JavaDoc getEditDate()
117    {
118       return date;
119    }
120
121    /**
122     * DOCUMENT_ME
123     *
124     * @param date DOCUMENT_ME
125     */

126    public void setEditDate(Date JavaDoc date)
127    {
128       this.date = date;
129    }
130
131    /**
132     * @hibernate.id
133     * column="jbp_id"
134     * generator-class="native"
135     */

136    public Integer JavaDoc getID()
137    {
138       return id;
139    }
140
141    /**
142     * DOCUMENT_ME
143     *
144     * @param id DOCUMENT_ME
145     */

146    public void setID(Integer JavaDoc id)
147    {
148       this.id = id;
149    }
150
151    /**
152     * @hibernate.property
153     * column="jbp_create_date"
154     * unique="false"
155     * update="false"
156     */

157    public Date JavaDoc getCreateDate()
158    {
159       return createDate;
160    }
161
162    /**
163     * DOCUMENT_ME
164     *
165     * @param createDate DOCUMENT_ME
166     */

167    public void setCreateDate(Date JavaDoc createDate)
168    {
169       this.createDate = createDate;
170    }
171
172    /**
173     * @hibernate.component
174     * class="org.jboss.portlet.forums.impl.MessageImpl"
175     */

176    public Message getMessage()
177    {
178       return message;
179    }
180
181    /**
182     * DOCUMENT_ME
183     *
184     * @param message DOCUMENT_ME
185     */

186    public void setMessage(Message message)
187    {
188       this.message = message;
189    }
190
191    /**
192     * @hibernate.many-to-one
193     * column="jbp_poster_id"
194     * class="org.jboss.portlet.forums.impl.PosterImpl"
195     */

196    public Poster getPoster()
197    {
198       return poster;
199    }
200
201    /**
202     * DOCUMENT_ME
203     *
204     * @param poster DOCUMENT_ME
205     */

206    public void setPoster(Poster poster)
207    {
208       this.poster = poster;
209    }
210 }
Popular Tags