@Entity public class UserPlayerJPA extends Object
| Constructor and Description |
|---|
UserPlayerJPA()
Empty constructor for the JPA User player.
|
UserPlayerJPA(UserJPA user,
String nick,
String name,
String lastName,
boolean selfPlayer)
Constructor for the JPA UserPlayer in which we create a player with the
attributes needed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
formatFullName()
Function to be called when the name or last name of the player changes.
|
byte[] |
getAvatar()
Get the avatar of the player.
|
String |
getContactEmail()
Get the email of the player.
|
Date |
getDeleted()
Get the deleted date of the player if it is deleted
|
String |
getFavouriteSports()
Get the favorite sport of the player.
|
String |
getFavouriteTeams()
Get the favorite teams of the player.
|
String |
getFullName()
Get the full name of the player.
|
String |
getInterests()
Get the interests of the player.
|
String |
getLastName()
Get the last name of the player.
|
String |
getLocation()
Get the location of the player.
|
String |
getName()
Get the name of the player.
|
String |
getNick()
Get the nick of the player.
|
String |
getProvince()
Get the province of the player.
|
String |
getUserWhoCreated()
Get the login of the user who create the player.
|
boolean |
isPrivateProfile()
Get if the player is in mode private or not.
|
boolean |
isSelfPlayer()
Get true if this player and the user who create it are the same person,
false if not.
|
void |
setAvatar(byte[] avatar)
Set the avatar of the player.
|
void |
setContactEmail(String contactEmail)
Set the email of the player.
|
void |
setDeleted(Date deleted)
Set the deleted date of the player.
|
void |
setFavouriteSports(String favouriteSports)
Set the favorite sport of the player.
|
void |
setFavouriteTeams(String favouriteTeams)
Set the favorite teams of the player.
|
void |
setInterests(String interests)
Set the interests of the player.
|
void |
setLastName(String lastName)
Set the last name of the player.
|
void |
setLocation(String location)
Set the location of the player.
|
void |
setName(String name)
Set the name of the player.
|
void |
setNick(String nick)
Set the nick of the player.
|
void |
setPrivateProfile(boolean privateProfile)
Set if the profile is in private mode or not.
|
void |
setProvince(String province)
Set the province of the player.
|
void |
setSelfPlayer(boolean selfPlayer)
Set if the player and the user are the same person.
|
void |
setUserWhoCreated(String userWhoCreated)
Set the login of the user who create player.
|
public UserPlayerJPA(UserJPA user, String nick, String name, String lastName, boolean selfPlayer) throws javax.mail.internet.AddressException
This method will create a new Player in the Database and some of his data will be the same than the user who created him, this is because an user can be a player, but also can create other players. In that last case, the players created must have some information, so we copy the information of the user to that player.
user - the user who is creating the playernick - a special name for the player to be know by everyonename - the name of the playerlastName - the last name of the playerselfPlayer - true if the user and the player are the same person, that
means that the user is creating a player profile to himself,
false otherwisejavax.mail.internet.AddressExceptionpublic UserPlayerJPA()
public String getFullName()
public String getName()
public void setName(String name)
name - the name of the playerpublic String getLastName()
public void setLastName(String lastName)
lastName - the last name of the playerpublic String getNick()
public void setNick(String nick)
nick - the nick of the playerpublic byte[] getAvatar()
public void setAvatar(byte[] avatar)
avatar - the avatar of the playerpublic String getInterests()
public void setInterests(String interests)
interests - the interests of the playerpublic String getContactEmail()
public void setContactEmail(String contactEmail) throws javax.mail.internet.AddressException
contactEmail - the email of the playerjavax.mail.internet.AddressExceptionpublic String getProvince()
public void setProvince(String province)
province - the province of the playerpublic String getLocation()
public void setLocation(String location)
location - the location of the playerpublic String getFavouriteSports()
public void setFavouriteSports(String favouriteSports)
favouriteSports - the favorite sport of the playerpublic String getFavouriteTeams()
public void setFavouriteTeams(String favouriteTeams)
favouriteTeams - the favorite teams of the playerpublic boolean isPrivateProfile()
public void setPrivateProfile(boolean privateProfile)
privateProfile - the mode of the profilepublic String getUserWhoCreated()
public void setUserWhoCreated(String userWhoCreated)
userWhoCreated - the login of the userpublic boolean isSelfPlayer()
public void setSelfPlayer(boolean selfPlayer)
selfPlayer - true if they are the same, false otherwisepublic void formatFullName()
public Date getDeleted()
public void setDeleted(Date deleted)
deleted - The deleted day of the playerCopyright © 2017. All rights reserved.