Git Repository Public Repository

ISBets21MAUBRY

URLs

Copy to Clipboard
 
3cf4057e97448d401b49261033b8ab566105944e
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@Entity
public class Bet {
	@GeneratedValue
	@Id
	@XmlJavaTypeAdapter(IntegerAdapter.class)
	private Integer betNumber;
	private Forecast forecast;
	private User user;
	private float amount;
	private String estadoApuesta; // Pendiente Ganada Perdida Anulada
	
	public  String getEstadoApuesta() {
		return estadoApuesta;
	}

	public void setEstadoApuesta(String estadoApuesta) {
		this.estadoApuesta = estadoApuesta;
	}

	public Bet() {
		super();
	}

	public Bet(Integer n, Forecast forecast, User user, float amount) {
		super();
		this.betNumber = n;
		this.forecast = forecast;
		this.user = user;
		this.amount = amount;
		this.estadoApuesta = "Pendiente";
	}

	public Bet(Forecast forecast, User user, float amount) {
		super();
		this.forecast = forecast;
		this.user = user;
		this.amount = amount;
		this.estadoApuesta = "Pendiente";

	}

	public Forecast getForecast() {
		return forecast;
	}

	public void setForecast(Forecast forecast) {
		this.forecast = forecast;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public float getAmount() {
		return amount;
	}

	public void setAmount(float amount) {
		this.amount = amount;
	}

	@Override
	public String toString() {
		return "Bet [forecast: " + forecast + ", user: " + user + ", amount: " + amount + "forecast: "
				+ forecast.getForecast() + "question: " + forecast.getQuestion().getQuestion() + "event: "
				+ forecast.getQuestion().getEvent().getDescription() + "]";
	}

	public String toString2() {

		

		

		return forecast.getQuestion().getEvent().getEventDate().toString().substring(0, 11) + "             "
				+ forecast.getQuestion().getEvent().getDescription() + "                             "
				+ forecast.getQuestion().getQuestion() + "                                                  "
				+ this.forecast.getForecast() + "                                           "
				+ estadoApuesta + "                                "
				+ forecast.getQuestion().getResult() + "                    " + this.getAmount()
				+ "                         " + forecast.getFee();

//				+ ""
//				+ ""
//				+ "forecast: " + forecast + ", amount: " + amount + "forecast: "
//				+ "question: " + forecast.getQuestion().getQuestion() + "event: "
//				+ forecast.getQuestion().getEvent().getDescription() + "]";
//	}

	}

	public String toString3() {

		return forecast.getQuestion().getEvent().getEventDate().toString().substring(0, 11)
				+ "                                   " + forecast.getQuestion().getEvent().getDescription()
				+ "                                        " + forecast.getQuestion().getQuestion()
				+ "                                    " + this.forecast.getForecast()
				+ "                                                         " + this.getAmount()
				+ "                                                             " + forecast.getFee();
	}
}

Commits for ISBets21MAUBRYeclipse-workspace/ISBets21MAUBRY/src/main/java/domain/Bet.java

Diff revisions: vs.
Revision Author Commited Message
3cf405 ... porkipig Sun 16 May, 2021 19:27:29 +0000

IteraciĆ³n 3(VersiĆ³n sin idiomas)