1
2
3
4
5
6
7 package hu.elte.tribus.model;
8
9 import javax.persistence.Column;
10 import javax.persistence.Entity;
11 import javax.persistence.FetchType;
12 import javax.persistence.GeneratedValue;
13 import javax.persistence.Id;
14 import javax.persistence.ManyToOne;
15
16 /***
17 * @author linux48
18 */
19 @Entity(name="qa")
20 public class QA {
21 @Id
22 @GeneratedValue
23 private Integer id;
24 @ManyToOne(fetch=FetchType.LAZY)
25 private Topic topic;
26 @Column(nullable=false)
27 private String question;
28 @Column(nullable=false)
29 private String answer;
30
31 public QA() {}
32 /***
33 * @return Returns the answer.
34 */
35 public String getAnswer() {
36 return answer;
37 }
38 /***
39 * @param answer The answer to set.
40 */
41 public void setAnswer(String answer) {
42 this.answer = answer;
43 }
44 /***
45 * @return Returns the id.
46 */
47 public Integer getId() {
48 return id;
49 }
50 /***
51 * @param id The id to set.
52 */
53 public void setId(Integer id) {
54 this.id = id;
55 }
56 /***
57 * @return Returns the question.
58 */
59 public String getQuestion() {
60 return question;
61 }
62 /***
63 * @param question The question to set.
64 */
65 public void setQuestion(String question) {
66 this.question = question;
67 }
68 /***
69 * @return Returns the topic.
70 */
71 public Topic getTopic() {
72 return topic;
73 }
74 /***
75 * @param topic The topic to set.
76 */
77 public void setTopic(Topic topic) {
78 this.topic = topic;
79 }
80
81 }