001: package app.data.test;
002:
003: import java.sql.Timestamp;
004: import java.util.List;
005: import javax.persistence.Entity;
006: import javax.persistence.Id;
007: import javax.persistence.Lob;
008: import javax.persistence.ManyToOne;
009: import javax.persistence.OneToMany;
010: import javax.persistence.Table;
011: import javax.persistence.Version;
012:
013: /**
014: * Topic entity bean.
015: */
016: @Entity
017: @Table(name="f_topic")
018: public class Topic {
019:
020: @Id
021: Integer id;
022:
023: String open;
024:
025: String title;
026:
027: @Lob
028: String body;
029:
030: @Lob
031: String editorNote;
032:
033: Integer postCount;
034:
035: Integer ratingCount;
036:
037: Integer ratingTotal;
038:
039: Timestamp cretime;
040:
041: @Version
042: Timestamp updtime;
043:
044: @ManyToOne
045: TopicType type;
046:
047: @ManyToOne
048: User user;
049:
050: @ManyToOne
051: Forum forum;
052:
053: @OneToMany
054: List<TopicPost> posts;
055:
056: /**
057: * Return id.
058: */
059: public Integer getId() {
060: return id;
061: }
062:
063: /**
064: * Set id.
065: */
066: public void setId(Integer id) {
067: this .id = id;
068: }
069:
070: /**
071: * Return open.
072: */
073: public String getOpen() {
074: return open;
075: }
076:
077: /**
078: * Set open.
079: */
080: public void setOpen(String open) {
081: this .open = open;
082: }
083:
084: /**
085: * Return title.
086: */
087: public String getTitle() {
088: return title;
089: }
090:
091: /**
092: * Set title.
093: */
094: public void setTitle(String title) {
095: this .title = title;
096: }
097:
098: /**
099: * Return body.
100: */
101: public String getBody() {
102: return body;
103: }
104:
105: /**
106: * Set body.
107: */
108: public void setBody(String body) {
109: this .body = body;
110: }
111:
112: /**
113: * Return editor note.
114: */
115: public String getEditorNote() {
116: return editorNote;
117: }
118:
119: /**
120: * Set editor note.
121: */
122: public void setEditorNote(String editorNote) {
123: this .editorNote = editorNote;
124: }
125:
126: /**
127: * Return post count.
128: */
129: public Integer getPostCount() {
130: return postCount;
131: }
132:
133: /**
134: * Set post count.
135: */
136: public void setPostCount(Integer postCount) {
137: this .postCount = postCount;
138: }
139:
140: /**
141: * Return rating count.
142: */
143: public Integer getRatingCount() {
144: return ratingCount;
145: }
146:
147: /**
148: * Set rating count.
149: */
150: public void setRatingCount(Integer ratingCount) {
151: this .ratingCount = ratingCount;
152: }
153:
154: /**
155: * Return rating total.
156: */
157: public Integer getRatingTotal() {
158: return ratingTotal;
159: }
160:
161: /**
162: * Set rating total.
163: */
164: public void setRatingTotal(Integer ratingTotal) {
165: this .ratingTotal = ratingTotal;
166: }
167:
168: /**
169: * Return cretime.
170: */
171: public Timestamp getCretime() {
172: return cretime;
173: }
174:
175: /**
176: * Set cretime.
177: */
178: public void setCretime(Timestamp cretime) {
179: this .cretime = cretime;
180: }
181:
182: /**
183: * Return updtime.
184: */
185: public Timestamp getUpdtime() {
186: return updtime;
187: }
188:
189: /**
190: * Set updtime.
191: */
192: public void setUpdtime(Timestamp updtime) {
193: this .updtime = updtime;
194: }
195:
196: /**
197: * Return type.
198: */
199: public TopicType getType() {
200: return type;
201: }
202:
203: /**
204: * Set type.
205: */
206: public void setType(TopicType type) {
207: this .type = type;
208: }
209:
210: /**
211: * Return user.
212: */
213: public User getUser() {
214: return user;
215: }
216:
217: /**
218: * Set user.
219: */
220: public void setUser(User user) {
221: this .user = user;
222: }
223:
224: /**
225: * Return forum.
226: */
227: public Forum getForum() {
228: return forum;
229: }
230:
231: /**
232: * Set forum.
233: */
234: public void setForum(Forum forum) {
235: this .forum = forum;
236: }
237:
238: /**
239: * Return posts.
240: */
241: public List<TopicPost> getPosts() {
242: return posts;
243: }
244:
245: /**
246: * Set posts.
247: */
248: public void setPosts(List<TopicPost> posts) {
249: this.posts = posts;
250: }
251:
252: }
|