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 Post entity bean.
015: */
016: @Entity
017: @Table(name="f_topic_post")
018: public class TopicPost {
019:
020: @Id
021: Integer id;
022:
023: String title;
024:
025: @Lob
026: String body;
027:
028: @Lob
029: String editorNote;
030:
031: Timestamp cretime;
032:
033: @Version
034: Timestamp updtime;
035:
036: @ManyToOne
037: TopicPost parent;
038:
039: @ManyToOne
040: Topic topic;
041:
042: @ManyToOne
043: User user;
044:
045: @OneToMany
046: List<TopicPost> posts;
047:
048: /**
049: * Return id.
050: */
051: public Integer getId() {
052: return id;
053: }
054:
055: /**
056: * Set id.
057: */
058: public void setId(Integer id) {
059: this .id = id;
060: }
061:
062: /**
063: * Return title.
064: */
065: public String getTitle() {
066: return title;
067: }
068:
069: /**
070: * Set title.
071: */
072: public void setTitle(String title) {
073: this .title = title;
074: }
075:
076: /**
077: * Return body.
078: */
079: public String getBody() {
080: return body;
081: }
082:
083: /**
084: * Set body.
085: */
086: public void setBody(String body) {
087: this .body = body;
088: }
089:
090: /**
091: * Return editor note.
092: */
093: public String getEditorNote() {
094: return editorNote;
095: }
096:
097: /**
098: * Set editor note.
099: */
100: public void setEditorNote(String editorNote) {
101: this .editorNote = editorNote;
102: }
103:
104: /**
105: * Return cretime.
106: */
107: public Timestamp getCretime() {
108: return cretime;
109: }
110:
111: /**
112: * Set cretime.
113: */
114: public void setCretime(Timestamp cretime) {
115: this .cretime = cretime;
116: }
117:
118: /**
119: * Return updtime.
120: */
121: public Timestamp getUpdtime() {
122: return updtime;
123: }
124:
125: /**
126: * Set updtime.
127: */
128: public void setUpdtime(Timestamp updtime) {
129: this .updtime = updtime;
130: }
131:
132: /**
133: * Return parent.
134: */
135: public TopicPost getParent() {
136: return parent;
137: }
138:
139: /**
140: * Set parent.
141: */
142: public void setParent(TopicPost parent) {
143: this .parent = parent;
144: }
145:
146: /**
147: * Return topic.
148: */
149: public Topic getTopic() {
150: return topic;
151: }
152:
153: /**
154: * Set topic.
155: */
156: public void setTopic(Topic topic) {
157: this .topic = topic;
158: }
159:
160: /**
161: * Return user.
162: */
163: public User getUser() {
164: return user;
165: }
166:
167: /**
168: * Set user.
169: */
170: public void setUser(User user) {
171: this .user = user;
172: }
173:
174: /**
175: * Return posts.
176: */
177: public List<TopicPost> getPosts() {
178: return posts;
179: }
180:
181: /**
182: * Set posts.
183: */
184: public void setPosts(List<TopicPost> posts) {
185: this.posts = posts;
186: }
187:
188: }
|