@Entity(name="Competition") public class Competition extends Object 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 |
| Modifier and Type | Method and Description |
|---|---|
void |
addSocialNetwork(String network,
String url)
Adds a Social Network to the 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
|
void |
editSocialNetwork(String network,
String url)
Edits a Social Network 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
|
Headquarter |
getHeadquarter()
Returns the headquarter 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
|
HashMap<String,String> |
getSocialNetworks()
Returns the socialNetworks of the competition
|
SportType |
getSport()
Returns the sport type of the competition
|
Collection<Team> |
getTeams()
Returns the teams of the competition
|
String |
getTelephone()
Returns the web of the contact person
|
CompetitionType |
getType()
Returns the type of the competition
|
String |
getWeb()
Returns the web of the competition
|
void |
removeSocialNetwork(String network)
Removes a Social Network of the Competition
|
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 |
setHeadquarter(Headquarter headquarter)
Sets the headquarter of the team
|
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 |
setSocialNetworks(HashMap<String,String> socialNetworks)
Sets the socialNetworks of the competition
|
void |
setSport(SportType sport)
Sets the sport of the competition
|
void |
setTeams(ArrayList<Team> teams)
Sets the teams of the competition
|
void |
setTelephone(String telephone)
Sets the telephone of the contact person
|
void |
setType(CompetitionType type)
Sets the type of the competition
|
void |
setWeb(String web)
Sets the web of the competition
|
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.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 empty and
non null string.email - the email of the contact personweb - the competition's websitetelephone - the phone of the contact personopenToInscription - indication of whether it is open to registration or if it is a
closed competitionminTeams - minimum number of competition teamsmaxTeams - maximum number of competition teamspublicVisibility - competition visibility. True visible, false privateadmin - the admin of the 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 String getName()
public void setName(String name)
name - the name 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 getAbbreviation()
public void setAbbreviation(String abbreviation)
abbreviation - the abbreviation 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 Collection<Team> getTeams()
public void setTeams(ArrayList<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 empty and non
null string.NullPointerException - if a null value is passed as the value for any parameter.public String getContactPerson()
public void setContactPerson(String contactPerson)
contactPerson - the contact person 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 getEmail()
public void setEmail(String email)
email - the email 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 getWeb()
public void setWeb(String web)
web - the web 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 getTelephone()
public void setTelephone(String telephone)
telephone - the telephone of the contact person. Must be a non empty and non
null Integer.NullPointerException - if a null value is passed as the value for any parameter.public HashMap<String,String> getSocialNetworks()
public void setSocialNetworks(HashMap<String,String> socialNetworks)
socialNetworks - the socialNetworks of the competition.NullPointerException - if a null value is passed as the value for any parameter.public 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.public 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.public User getAdmin()
public void setAdmin(User admin)
admin - the admin of the competition. Must be a non null User.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 Headquarter getHeadquarter()
public void setHeadquarter(Headquarter headquarter)
headquarter - is a headquarter instance with all the info. Must be a non
null Headquarter.NullPointerException - if a null value is passed as the value for any parameter.public void addSocialNetwork(String network, String url)
network - is the social network . Must be a non empty and non null
string.url - is the social network url. Must be a non empty and non
null string.NullPointerException - if a null value is passed as the value for any parameter.public void removeSocialNetwork(String network)
network - is the social network . Must be a non empty and non null
string.NullPointerException - if a null value is passed as the value for any parameter.public void editSocialNetwork(String network, String url)
network - is the social network . Must be a non empty and non null
string.url - is the social network url. 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.public 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.Copyright © 2017. All rights reserved.