Tournament.java
3.23 KB
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
113
114
115
116
117
118
119
package fi.codecrew.moya.model;
import fi.codecrew.moya.enums.TournamentStatus;
import fi.codecrew.moya.enums.TournamentType;
import fi.codecrew.moya.model.GenericEntity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.*;
import org.eclipse.persistence.annotations.OptimisticLocking;
import org.eclipse.persistence.annotations.OptimisticLockingType;
/**
* Entity implementation class for Entity: Tournament
*
*/
@Entity
@Table(name="tournaments")
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
public class Tournament extends GenericEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name="talyn_tournament_id", nullable=true)
private Integer talynTournamentId;
@JoinColumn(name = "event_id", nullable = false)
private LanEvent lanEvent;
@Column(name="tournament_name")
private String tournamentName;
@Column(name="registration_opens_at")
@Temporal(TemporalType.TIMESTAMP)
private Date registrationOpensAt;
@Column(name="registration_closes_at")
@Temporal(TemporalType.TIMESTAMP)
private Date registrationClosesAt;
@Column(name="begins_at")
@Temporal(TemporalType.TIMESTAMP)
private Date beginsAt;
@Column(name="tournament_type")
@Enumerated(EnumType.STRING)
private TournamentType tournamentType;
@Column(name="tournament_status")
@Enumerated(EnumType.STRING)
private TournamentStatus tournamentStatus;
@JoinColumn(name="tournament_root")
private TournamentMatch tournamentRoot;
@Column(name="players_per_match")
private Integer playersPerMatch;
@Column(name="players_per_team")
private Integer playersPerTeam;
@JoinColumn(name="game", nullable=false)
private TournamentGame tournamentGame;
@OneToMany
@OrderBy("id ASC")
private List<Tournament> subTournaments;
public Tournament() { super(); }
public Integer getTalynTournamentId() {
return talynTournamentId;
}
public void setTalynTournamentId(Integer talynTournamendId) {
this.talynTournamentId = talynTournamendId;
}
public String getTournamentName() {
return tournamentName;
}
public void setTournamentName(String tournamentName) {
this.tournamentName = tournamentName;
}
public Date getRegistrationOpensAt() {
return registrationOpensAt;
}
public void setRegistrationOpensAt(Date registrationOpensAt) {
this.registrationOpensAt = registrationOpensAt;
}
public Date getRegistrationClosesAt() {
return registrationClosesAt;
}
public void setRegistrationClosesAt(Date registrationClosesAt) {
this.registrationClosesAt = registrationClosesAt;
}
public TournamentType getTournamentType() {
return tournamentType;
}
public void setTournamentType(TournamentType tournamentType) {
this.tournamentType = tournamentType;
}
public TournamentGame getTournamentGame() {
return tournamentGame;
}
public void setTournamentGame(TournamentGame tournamentGame) {
this.tournamentGame = tournamentGame;
}
}