VersiĆ³n del proyecto de Apuestas tras la iteraciĆ³n 1
[ISBets21MAUBRY] / eclipse-workspace / ISBets21BRYMAUJONUNA / src / main / java / domain / Forecast.java
1 package domain;
2
3 import javax.persistence.Entity;
4 import javax.persistence.Id;
5
6 @Entity
7 public class Forecast {
8         @Id
9         private Integer forecastNumber;
10         private String forecast;
11         private Question question;
12         
13         
14         public Forecast(int n, String s, Question q) {
15                 forecast = s;
16                 question = q;
17                 forecastNumber = n;
18         }
19         
20         public Forecast(String s, Question q) {
21                 forecast = s;
22                 question = q;
23         }
24         
25         public String getForecast() {
26                 return forecast;
27         }
28         
29         public void setForecast(String s) {
30                 forecast = s;
31         }
32         
33         public Question getQuestion() {
34                 return question;
35         }
36         
37         public void setQuestion(Question q) {
38                 question = q;
39         }
40         
41         public Integer getForecastNumber() {
42                 return forecastNumber;
43         }
44         
45         public void setForecastNumber(int n) {
46                 forecastNumber = n;
47         }
48         
49         public String toString(){
50                 return forecastNumber + ";" + question.toString()+"; Forecast: "+forecast;
51         }
52 }