5 import javax.persistence.*;
6 import javax.xml.bind.annotation.XmlAccessType;
7 import javax.xml.bind.annotation.XmlAccessorType;
8 import javax.xml.bind.annotation.XmlIDREF;
9 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
12 @SuppressWarnings("serial")
13 @XmlAccessorType(XmlAccessType.FIELD)
15 public class Question implements Serializable {
18 @XmlJavaTypeAdapter(IntegerAdapter.class)
20 private Integer questionNumber;
21 private String question;
22 private float betMinimum;
23 private String result;
31 public Question(Integer queryNumber, String query, float betMinimum, Event event) {
33 this.questionNumber = queryNumber;
34 this.question = query;
35 this.betMinimum=betMinimum;
39 public Question(String query, float betMinimum, Event event) {
41 this.question = query;
42 this.betMinimum=betMinimum;
48 * Get the number of the question
50 * @return the question number
52 public Integer getQuestionNumber() {
53 return questionNumber;
57 * Set the bet number to a question
59 * @param questionNumber to be setted
61 public void setQuestionNumber(Integer questionNumber) {
62 this.questionNumber = questionNumber;
67 * Get the question description of the bet
69 * @return the bet question
72 public String getQuestion() {
78 * Set the question description of the bet
80 * @param question to be setted
82 public void setQuestion(String question) {
83 this.question = question;
89 * Get the minimun ammount of the bet
91 * @return the minimum bet ammount
94 public float getBetMinimum() {
100 * Get the minimun ammount of the bet
102 * @param betMinimum minimum bet ammount to be setted
105 public void setBetMinimum(float betMinimum) {
106 this.betMinimum = betMinimum;
112 * Get the result of the query
114 * @return the the query result
116 public String getResult() {
123 * Get the result of the query
125 * @param result of the query to be setted
128 public void setResult(String result) {
129 this.result = result;
135 * Get the event associated to the bet
137 * @return the associated event
139 public Event getEvent() {
146 * Set the event associated to the bet
148 * @param event to associate to the bet
150 public void setEvent(Event event) {
157 public String toString(){
158 return questionNumber+";"+question+";"+Float.toString(betMinimum);