PollAnswer.java
1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package fi.insomnia.bortal.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "poll_answer")
public class PollAnswer extends GenericEventChild implements Serializable {
private static final long serialVersionUID = 1L;
@Lob
@Column(name = "answer_text", nullable = true)
private String answerText;
@ManyToOne
@Column(name = "question_id", nullable = false)
private PossibleAnswer choice;
public void setAnswerText(String answerText) {
this.answerText = answerText;
}
public PollAnswer(PollQuestion q)
{
super(new EventPk(q.getId().getId()));
}
public String getAnswerText() {
return answerText;
}
public void setChoise(PossibleAnswer choice) {
this.choice = choice;
}
public PossibleAnswer getChoice() {
return choice;
}
}