1
2
3
4
5
6
7 package hu.elte.tribus.model;
8
9 import java.util.Date;
10
11 import javax.persistence.Column;
12 import javax.persistence.Entity;
13 import javax.persistence.FetchType;
14 import javax.persistence.GeneratedValue;
15 import javax.persistence.Id;
16 import javax.persistence.ManyToOne;
17
18 /***
19 * @author linux48
20 */
21 @Entity(name="item")
22 public class Item {
23
24 @Id
25 @GeneratedValue
26 private Integer id;
27 @Column(name="added")
28 private Date date;
29
30 @Column
31 private String question;
32 @ManyToOne(fetch=FetchType.LAZY, optional=true)
33 private QA qa;
34 @ManyToOne(fetch=FetchType.LAZY, optional=false)
35 private Conversation conversation;
36
37 /***
38 * @return Returns the date.
39 */
40 public Date getDate() {
41 return date;
42 }
43 /***
44 * @param date The date to set.
45 */
46 public void setDate(Date date) {
47 this.date = date;
48 }
49 /***
50 * @return Returns the id.
51 */
52 public Integer getId() {
53 return id;
54 }
55 /***
56 * @param id The id to set.
57 */
58 public void setId(Integer id) {
59 this.id = id;
60 }
61 /***
62 * @return Returns the qa.
63 */
64 public QA getQa() {
65 return qa;
66 }
67 /***
68 * @param qa The qa to set.
69 */
70 public void setQa(QA qa) {
71 this.qa = qa;
72 }
73 public Conversation getConversation() {
74 return conversation;
75 }
76
77 public void setConversation(Conversation conversation) {
78 this.conversation = conversation;
79 }
80
81 public String getQuestion() {
82 return question;
83 }
84
85 public void setQuestion(String question) {
86 this.question = question;
87 }
88
89 }