001: package app.data;
002:
003: import java.sql.Timestamp;
004: import javax.persistence.Entity;
005: import javax.persistence.Id;
006: import javax.persistence.Lob;
007: import javax.persistence.ManyToOne;
008: import javax.persistence.Table;
009: import javax.persistence.Version;
010:
011: /**
012: * Comment entity bean.
013: */
014: @Entity
015: @Table(name="c_comment")
016: public class Comment {
017:
018: @Id
019: Integer id;
020:
021: String title;
022:
023: @Lob
024: String body;
025:
026: Timestamp cretime;
027:
028: @Version
029: Timestamp updtime;
030:
031: @ManyToOne
032: CommentLink link;
033:
034: @ManyToOne
035: User user;
036:
037: /**
038: * Return id.
039: */
040: public Integer getId() {
041: return id;
042: }
043:
044: /**
045: * Set id.
046: */
047: public void setId(Integer id) {
048: this .id = id;
049: }
050:
051: /**
052: * Return title.
053: */
054: public String getTitle() {
055: return title;
056: }
057:
058: /**
059: * Set title.
060: */
061: public void setTitle(String title) {
062: this .title = title;
063: }
064:
065: /**
066: * Return body.
067: */
068: public String getBody() {
069: return body;
070: }
071:
072: /**
073: * Set body.
074: */
075: public void setBody(String body) {
076: this .body = body;
077: }
078:
079: /**
080: * Return cretime.
081: */
082: public Timestamp getCretime() {
083: return cretime;
084: }
085:
086: /**
087: * Set cretime.
088: */
089: public void setCretime(Timestamp cretime) {
090: this .cretime = cretime;
091: }
092:
093: /**
094: * Return updtime.
095: */
096: public Timestamp getUpdtime() {
097: return updtime;
098: }
099:
100: /**
101: * Set updtime.
102: */
103: public void setUpdtime(Timestamp updtime) {
104: this .updtime = updtime;
105: }
106:
107: /**
108: * Return link.
109: */
110: public CommentLink getLink() {
111: return link;
112: }
113:
114: /**
115: * Set link.
116: */
117: public void setLink(CommentLink link) {
118: this .link = link;
119: }
120:
121: /**
122: * Return user.
123: */
124: public User getUser() {
125: return user;
126: }
127:
128: /**
129: * Set user.
130: */
131: public void setUser(User user) {
132: this.user = user;
133: }
134:
135: }
|