1
2
3
4 package sk.stuba.fiit.foo07.genex.beans;
5
6 import java.sql.Timestamp;
7
8
9
10
11
12 public class Question implements Comparable<Question> {
13
14 private String text;
15 private Integer difficulty;
16 private Timestamp created;
17 private Timestamp lastUpdate;
18 private Integer questionID;
19 private Integer userID;
20 private Integer questionTypeID;
21 private Integer derivedFromID;
22
23 public Question() {
24 }
25
26 public Question(String text, Integer difficulty, Timestamp created,
27 Timestamp lastUpdate, Integer questionID, Integer userID,
28 Integer questionTypeID, Integer derivedFromID) {
29 super();
30 this.text = text;
31 this.difficulty = difficulty;
32 this.created = created;
33 this.lastUpdate = lastUpdate;
34 this.questionID = questionID;
35 this.userID = userID;
36 this.questionTypeID = questionTypeID;
37 this.derivedFromID = derivedFromID;
38 }
39
40
41
42
43 public String getText() {
44 return text;
45 }
46
47
48
49
50
51 public void setText(String text) {
52 this.text = text;
53 }
54
55
56
57
58 public Integer getDifficulty() {
59 return difficulty;
60 }
61
62
63
64
65
66 public void setDifficulty(Integer difficulty) {
67 this.difficulty = difficulty;
68 }
69
70
71
72
73 public Timestamp getCreated() {
74 return created;
75 }
76
77
78
79
80
81 public void setCreated(Timestamp created) {
82 this.created = created;
83 }
84
85
86
87
88 public Timestamp getLastUpdate() {
89 return lastUpdate;
90 }
91
92
93
94
95
96 public void setLastUpdate(Timestamp lastUpdate) {
97 this.lastUpdate = lastUpdate;
98 }
99
100
101
102
103 public Integer getQuestionID() {
104 return questionID;
105 }
106
107
108
109
110
111 public void setQuestionID(Integer questionID) {
112 this.questionID = questionID;
113 }
114
115
116
117
118 public Integer getUserID() {
119 return userID;
120 }
121
122
123
124
125
126 public void setUserID(Integer userID) {
127 this.userID = userID;
128 }
129
130
131
132
133 public Integer getQuestionTypeID() {
134 return questionTypeID;
135 }
136
137
138
139
140
141 public void setQuestionTypeID(Integer questionTypeID) {
142 this.questionTypeID = questionTypeID;
143 }
144
145
146
147
148 public Integer getDerivedFromID() {
149 return derivedFromID;
150 }
151
152
153
154
155
156 public void setDerivedFromID(Integer derivedFromID) {
157 this.derivedFromID = derivedFromID;
158 }
159
160
161
162
163 @Override
164 public String toString() {
165 return this.text;
166 }
167
168
169
170
171 @Override
172 public int compareTo(Question arg0) {
173 return this.difficulty.compareTo(arg0.difficulty);
174 }
175
176 }