@Entity public class Team extends Removed implements Serializable
| Constructor and Description |
|---|
Team(String nameTeam,
String nick,
SportType sportType,
String contactPerson,
User user)
Creates a new instance
Team |
Team(String nameTeam,
String nickTeam,
String descriptionTeam,
SportType sportType,
Headquarter headquarter,
String contactPerson,
String email,
String web,
String phone,
String facebook,
String twitter,
String instagram,
boolean openToInscription,
int minPlayers,
int maxPlayers,
boolean isVisible,
User user,
Player... players)
Creates a new instance
Team |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptInvitationCompetition(Competition competition)
Accepts the invitation of a competition
|
void |
addPlayer(Player player)
Adds a player to this team
|
List<Competition> |
getCompetitions()
Returns the competitions of the team
|
String |
getContactPerson()
Returns the name of the contact person
|
String |
getDescriptionTeam()
Returns the description of the team
|
String |
getEmail()
Returns the email of the contact person
|
String |
getFacebook()
Gets the facebook link of the team
|
Headquarter |
getHeadquarter()
Returns the headquarters of this team.
|
String |
getInstagram()
Gets the instagram link of the team
|
List<InvitationBetweenTeamCompetition> |
getInvitationsCompetition()
Returns the list of invitations from this team
|
int |
getMaxPlayers()
Returns the maximum number of the team
|
int |
getMinPlayers()
Returns the minimum number of the team
|
String |
getNameTeam()
Returns the name of the team
|
String |
getNickTeam()
Returns the abbreviation name of the team
|
String |
getPhone()
Returns the phone of the contact person
|
Collection<Player> |
getPlayers()
Returns the players that belongs to this team.
|
SportType |
getSportType()
Returns the type of the team
|
String |
getTwitter()
Gets the twitter link of the team
|
User |
getUser()
Returns the user who manages this team
|
String |
getWeb()
Returns the team's website
|
boolean |
isOpenToInscription()
Returns if the team is open to registration or not
|
boolean |
isVisible()
Returns if the equipment is public or private.
|
boolean |
ownsPlayer(Player player)
Check if the player belongs to this team
|
void |
rejectInvitationCompetition(Competition competition)
Rejects the invitation of a competition
|
void |
removePlayer(Player player)
Removes a player from this team
|
void |
setContactPerson(String contactPerson)
Sets the name of the contact person
|
void |
setDescriptionTeam(String descriptionTeam)
Sets the description of a team
|
void |
setEmail(String email)
Sets the email of the contact person
|
void |
setFacebook(String facebook)
Sets the facebook link of the team
|
void |
setHeadquarter(Headquarter headquarter)
Sets the headquarters of this team.
|
void |
setInstagram(String instagram)
Sets the instagram link of the team
|
void |
setMaxPlayers(int maxPlayers)
Sets the maximum number of team players
|
void |
setMinPlayers(int minPlayers)
Sets the minimum number of the players
|
void |
setNameTeam(String nameTeam)
Sets the name of the team
|
void |
setNickTeam(String nickTeam)
Sets the abbreviation name of the team
|
void |
setOpenToInscription(boolean openToInscription)
Sets to close or open for a inscription
|
void |
setPhone(String phone)
Sets the phone of the contact person
|
void |
setSportType(SportType sportType)
Sets the type of the team
|
void |
setTwitter(String twitter)
Sets the twitter link of the team
|
void |
setUser(User user)
Sets the user of this team
|
void |
setVisible(boolean isVisible)
Sets the visibility of the team.
|
void |
setWeb(String web)
Sets the team's website
|
isRemoved, setRemovedpublic Team(String nameTeam, String nickTeam, String descriptionTeam, SportType sportType, Headquarter headquarter, String contactPerson, String email, String web, String phone, String facebook, String twitter, String instagram, boolean openToInscription, int minPlayers, int maxPlayers, boolean isVisible, User user, Player... players)
TeamnameTeam - the name of the team which identifies the team in our system. Must
be a non empty and non null string with a maximum length
of 100 chars.nickTeam - shortcut identifier for the identification. Must be a non empty
and non null string with a maximum length of 25 chars.descriptionTeam - the description of a team.sportType - is an enumerated data with all the possibles choices of our system
in terms of competition. Must be a non empty and non null
string.headquarter - data of the headquarters entitycontactPerson - the person who manages the team. Must be a non empty and non
null string.email - the email of the contact personweb - the team's websitephone - the phone of the contact personfacebook - the facebook link of the teamtwitter - the twitter link of the teaminstagram - the instagram link of the teamopenToInscription - indication of whether it is open to registration or if it is a
closed teamminPlayers - minimum number of team playersmaxPlayers - maximum number of team playersisVisible - team visibility. True visible, false privateuser - user who manages the team. The user can't be nullplayers - players that belong to this teamNullPointerException - 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 Team(String nameTeam, String nick, SportType sportType, String contactPerson, User user)
TeamnameTeam - the name of the team which identifies the team in our system. Must
be a non empty and non null string with a maximum length
of 100 chars.nick - shortcut identifier for the identification. Must be a non empty
and non null string with a maximum length of 25 chars.sportType - is an enumerated data with all the possibles choices of our system
in terms of competition. Must be a non empty and non null
string.contactPerson - the person who manages the team. Must be a non empty and non
null string.user - user who manages the team. The user can't be nullNullPointerException - 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 getNameTeam()
public void setNameTeam(String nameTeam)
nameTeam - the name of the team which identifies the team in our system. 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 getNickTeam()
public void setNickTeam(String nickTeam)
nickTeam - shortcut identifier for the identification. 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 String getDescriptionTeam()
public void setDescriptionTeam(String descriptionTeam)
descriptionTeam - the description of a team.public SportType getSportType()
public void setSportType(SportType sportType)
sportType - is an enumerated data with all the possibles choices of our system
in terms of competition. 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 - data of the headquarters entitypublic String getContactPerson()
public void setContactPerson(String contactPerson)
contactPerson - the person who manages the team. 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 contact personpublic String getWeb()
public void setWeb(String web)
web - the team's websitepublic String getPhone()
public void setPhone(String phone)
phone - the phone of the contact personpublic String getFacebook()
public void setFacebook(String facebook)
facebook - the facebook link to setpublic String getInstagram()
public void setInstagram(String instagram)
instagram - the instagram link to setpublic String getTwitter()
public void setTwitter(String twitter)
twitter - the twitter link to setpublic boolean isOpenToInscription()
public void setOpenToInscription(boolean openToInscription)
openToInscription - indication of whether it is open to registration or if it is a
closed teampublic int getMinPlayers()
public void setMinPlayers(int minPlayers)
minPlayers - minimum number of team playerspublic int getMaxPlayers()
public void setMaxPlayers(int maxPlayers)
maxPlayers - maximum number of team playerspublic boolean isVisible()
public void setVisible(boolean isVisible)
isVisible - team visibility. True visible, false privatepublic User getUser()
public void setUser(User user)
user - the new user of this teampublic Collection<Player> getPlayers()
public void addPlayer(Player player)
player - the player to add to this teamNullPointerException - if a player if nullpublic void removePlayer(Player player)
player - the player to remove from this teamNullPointerException - if a player if nullIllegalArgumentException - if the player does not belong to this teampublic boolean ownsPlayer(Player player)
player - the player whose property will be checkedtrue if the player belongs to this team. false
otherwisepublic List<InvitationBetweenTeamCompetition> getInvitationsCompetition()
public List<Competition> getCompetitions()
public void acceptInvitationCompetition(Competition competition)
competition - is the competition to acceptNullPointerException - if a null value is passed as the value for any parameter.public void rejectInvitationCompetition(Competition competition)
competition - is the competition to acceptNullPointerException - if a null value is passed as the value for any parameter.Copyright © 2017. All rights reserved.