@Entity(name="Competition") public class Competition extends Removed implements Serializable
| Constructor and Description |
|---|
Competition(String name,
String abbreviation,
String description,
SportType sport,
CompetitionType type,
String contactPerson,
String email,
String web,
String telephone,
Boolean openToInscription,
Boolean publicVisibility,
Integer minTeams,
Integer maxTeams,
User admin)
Creates a new instance
Competition |
Competition(String name,
String abbreviation,
String description,
SportType sport,
CompetitionType type,
String contactPerson,
String email,
String web,
String telephone,
String facebook,
String twitter,
String instagram,
Boolean openToInscription,
Boolean publicVisibility,
Integer minTeams,
Integer maxTeams,
User admin,
List<Team> teams,
List<Headquarter> headquarters,
List<Team> competitors)
Creates a new instance
Competition |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeadquarters(Headquarter headquarters)
Adds a headquarters from this competition
|
void |
addTeam(Team team)
Adds a team to the Competition
|
void |
changeOpenToInscription()
Changes the inscription status of the Competition
|
void |
changePublicVisibility()
Changes the visibility of the Competition
|
String |
getAbbreviation()
Returns the abbreviation of the competition
|
User |
getAdmin()
Returns the admin of the competition
|
String |
getContactPerson()
Returns the name of the contact person
|
String |
getDescription()
Returns the description of the competition
|
String |
getEmail()
Returns the email of the competition
|
String |
getFacebook()
Returns the facebook account of the competition
|
Collection<Headquarter> |
getHeadquarters()
Returns the headquarters that belongs to this competitions.
|
int |
getId()
Returns identification of the competition
|
String |
getInstagram()
Returns the instagram account of the competition
|
Integer |
getMaxTeams()
Returns the maximum teams that participate in the competition
|
Integer |
getMinTeams()
Returns the minimum teams that participate in the competition
|
String |
getName()
Returns the name of the competition
|
Boolean |
getOpenToInscription()
Returns if the competition inscription is open
|
Boolean |
getPublicVisibility()
Returns if the competition is visible for everybody
|
SportType |
getSport()
Returns the sport type of the competition
|
List<Team> |
getTeams()
Returns the teams of the competition
|
String |
getTelephone()
Returns the web of the contact person
|
String |
getTwitter()
Return the twitter account of the competition
|
CompetitionType |
getType()
Returns the type of the competition
|
String |
getWeb()
Returns the web of the competition
|
boolean |
ownsTeam(Team team)
Check if the player belongs to this team
|
void |
removeHeadquarters(Headquarter headquarters)
Removes a headquarters from this competition and removes the competition from
the headquarters
|
void |
removeTeam(Team team)
Removes a team to the Competition
|
void |
setAbbreviation(String abbreviation)
Sets the abbreviation of the competition
|
void |
setAdmin(User admin)
Sets the admin of the competition
|
void |
setContactPerson(String contactPerson)
Sets the contact person of the competition
|
void |
setDescription(String description)
Sets the description of the competition
|
void |
setEmail(String email)
Sets the email of the competition
|
void |
setFacebook(String facebook)
Sets the facebook account of the competition
|
void |
setInstagram(String instagram)
Sets the instagram account of the competition
|
void |
setMaxTeams(Integer maxTeams)
Sets the maximum of teams in the competition
|
void |
setMinTeams(Integer minTeams)
Sets the minimum of teams in the competition
|
void |
setName(String name)
Sets the name of the competition
|
void |
setOpenToInscription(Boolean openToInscription)
Sets the state of the inscriptions in the competition
|
void |
setPublicVisibility(Boolean publicVisibility)
Sets the visibility of the competition
|
void |
setSport(SportType sport)
Sets the sport of the competition
|
void |
setTeams(List<Team> teams)
Sets the teams of the competition
|
void |
setTelephone(String telephone)
Sets the telephone of the contact person
|
void |
setTwitter(String twitter)
Sets the twitter account of the competition
|
void |
setType(CompetitionType type)
Sets the type of the competition
|
void |
setWeb(String web)
Sets the web of the competition
|
isRemoved, setRemovedpublic Competition(String name, String abbreviation, String description, SportType sport, CompetitionType type, String contactPerson, String email, String web, String telephone, String facebook, String twitter, String instagram, Boolean openToInscription, Boolean publicVisibility, Integer minTeams, Integer maxTeams, User admin, List<Team> teams, List<Headquarter> headquarters, List<Team> competitors)
Competitionname - the name of the competition which identifies the competition in
our system. Must be a non empty and non null string with a
maximum length of 100 chars.abbreviation - shortcut identifier for the identification. Must be a non empty
and non null string with a maximum length of 25 chars.description - the description of a competition. Must be a non null
string with a maximum length of 250 chars.sport - is an enumerated data with all the possibles choices of our system
in terms of competition sport. Must be a non empty and non
null string.type - is an enumerated data with all the possibles choices of our system
in terms of competition type. Must be a non empty and non
null string.contactPerson - the person who manages the competition. Must be a non null
string with a maximum length of 100 chars.email - the email of the contact person. Must be a non null string
with a maximum length of 100 chars.web - the competition's website. Must be a non null string with
a maximum length of 150 chars.telephone - the phone of the contact person. Must be a non null string
with a maximum length of 25 chars.facebook - the facebook account of the competitiontwitter - the twitter account of the competitioninstagram - the instagram account of the competitionopenToInscription - indication of whether it is open to registration or if it is a
closed competitionminTeams - minimum number of competition teams. This number must be greater
than 0.maxTeams - maximum number of competition teams. This number must be greater
than 0.publicVisibility - competition visibility. True visible, false privateadmin - the admin of the competition, Must be a non nullteams - the teams that belong to this competitionheadquarters - the headquarters that belong to this competitioncompetitors - the competitors that belong to this competitionNullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public Competition(String name, String abbreviation, String description, SportType sport, CompetitionType type, String contactPerson, String email, String web, String telephone, Boolean openToInscription, Boolean publicVisibility, Integer minTeams, Integer maxTeams, User admin)
Competitionname - the name of the competition which identifies the competition in
our system. Must be a non empty and non null string with a
maximum length of 100 chars.abbreviation - shortcut identifier for the identification. Must be a non empty
and non null string with a maximum length of 25 chars.description - the description of a competition. Must be a non null
string with a maximum length of 250 chars.sport - is an enumerated data with all the possibles choices of our system
in terms of competition sport. Must be a non empty and non
null string.type - is an enumerated data with all the possibles choices of our system
in terms of competition type. Must be a non empty and non
null string.contactPerson - the person who manages the competition. Must be a non null
string with a maximum length of 100 chars.email - the email of the contact person. Must be a non null string
with a maximum length of 100 chars.web - the competition's website. Must be a non null string with
a maximum length of 150 chars.telephone - the phone of the contact person. Must be a non null string
with a maximum length of 25 chars.openToInscription - indication of whether it is open to registration or if it is a
closed competitionminTeams - minimum number of competition teams. This number must be greater
than 0.maxTeams - maximum number of competition teams. This number must be greater
than 0.publicVisibility - competition visibility. True visible, false privateadmin - the admin of the competition. Must be a non null.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public int getId()
public String getName()
public void setName(String name)
name - the name of the competition. Must be a non empty and non
null string with a maximum length of 100 chars.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public String getAbbreviation()
public void setAbbreviation(String abbreviation)
abbreviation - the abbreviation of the competition. Must be a non empty and non
null string with a maximum length of 25 chars.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public List<Team> getTeams()
public void setTeams(List<Team> teams)
teams - the teams of the competition. Must be a non empty and non
null string.NullPointerException - if a null value is passed as the value for any parameter.public String getDescription()
public void setDescription(String description)
description - the description of the competition. Must be a non null
string with a maximum length of 250 chars.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public String getContactPerson()
public void setContactPerson(String contactPerson)
contactPerson - the contact person of the competition. Must be a non null
string with a maximum length of 100 chars.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public String getEmail()
public void setEmail(String email)
email - the email of the competition. Must be a non null string
with a maximum length of 100 chars.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public String getWeb()
public void setWeb(String web)
web - the web of the competition. Must be a non null string with
a maximum length of 150 chars.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public String getTelephone()
public void setTelephone(String telephone)
telephone - the telephone of the contact person. Must be a non null
string with a maximum length of 25 chars.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if value provided for any parameter is not valid according to its
description.public String getFacebook()
public void setFacebook(String facebook)
facebook - the new facebook account of the competitionpublic String getTwitter()
public void setTwitter(String twitter)
twitter - the new twitter account of the competitionpublic String getInstagram()
public void setInstagram(String instagram)
instagram - the new instagram account of the competitionpublic Boolean getOpenToInscription()
public void setOpenToInscription(Boolean openToInscription)
openToInscription - the state of the inscription in the competition (true=open,
false=closed). Must be a non empty and non null Boolean.NullPointerException - if a null value is passed as the value for any parameter.public Boolean getPublicVisibility()
public void setPublicVisibility(Boolean publicVisibility)
publicVisibility - the visibility of the competition (public=true, private=false).
Must be a non empty and non null Boolean.NullPointerException - if a null value is passed as the value for any parameter.public Integer getMinTeams()
public void setMinTeams(Integer minTeams)
minTeams - the minimum of teams in the competition. Must be a positive and
non null Integer.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if a minTeams is a number less than 0public Integer getMaxTeams()
public void setMaxTeams(Integer maxTeams)
maxTeams - the maximum of teams in the competition. Must be a positive and
non null Integer.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if a maxTeams is a number less than 0public User getAdmin()
public void setAdmin(User admin)
admin - the admin of the competition. Must be a non null User.NullPointerException - if a null value is passed as the value for any parameter.public SportType getSport()
public void setSport(SportType sport)
sport - is an enumerated data with all the possibles choices of our system
in terms of competition sports. Must be a non empty and non
null string.NullPointerException - if a null value is passed as the value for any parameter.public CompetitionType getType()
public void setType(CompetitionType type)
type - is an enumerated data with all the possibles choices of our system
in terms of competition type. Must be a non empty and non
null string.NullPointerException - if a null value is passed as the value for any parameter.public void changeOpenToInscription()
public void changePublicVisibility()
public void addTeam(Team team)
team - is a team instance. Must be a non null Team.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if the team belongs to this competition or this
competition is completepublic void removeTeam(Team team)
team - is a team instance. Must be a non null Team.NullPointerException - if a null value is passed as the value for any parameter.IllegalArgumentException - if the team does not belong to this competitionpublic void addHeadquarters(Headquarter headquarters)
headquarters - the headquarters to add to this competitionNullPointerException - if a headquarters is null.public void removeHeadquarters(Headquarter headquarters)
headquarters - the headquarters to remove to this competitionNullPointerException - if a headquarters is null.IllegalArgumentException - if the headquarters does not belong to this competitionpublic Collection<Headquarter> getHeadquarters()
public boolean ownsTeam(Team team)
team - the player whose property will be checkedtrue if the player belongs to this team. false
otherwiseCopyright © 2017. All rights reserved.