@Entity public class User extends Object
| Constructor and Description |
|---|
User()
Empty constructor for the JPA User.
|
User(String login,
String email,
String password)
Constructor for the JPA User in which we create a simple user with the
attributes needed.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getActivationCode()
Get the key of an user to be activated.
|
String |
getAddress()
Get the address of the user.
|
String |
getAddressFormated()
Get the full address of an user formated like a postal.
|
Date |
getBirthDate()
Get the birth date of the user.
|
String |
getCountry()
Get the country of the user.
|
Date |
getDeleted()
Get the deleted date of the user if it is deleted
|
String |
getEmail()
Get the email of the user.
|
String |
getFacebookProfile()
Get the Facebook URL of the user.
|
String |
getInstagramProfile()
Get the Instagram URL of the user.
|
String |
getLastName()
Get the last name of the user.
|
String |
getLocation()
Get the location of the user.
|
String |
getLogin()
Get the login of the user.
|
String |
getName()
Get the name of the user.
|
String |
getNumberID()
Get the identification (DNI, Passport..) of the user.
|
String |
getPassword()
Get the password encrypted of the user.
|
String |
getPhoneNumber()
Get the phone number of the user with the country-code, thats why is a String
value.
|
int |
getPostalCode()
Get the postal code of the user.
|
String |
getProvince()
Get the province of the user.
|
String |
getTwitterProfile()
Get the Twitter URL of the user.
|
boolean |
isConfirmed()
Get if the user is confirmed or not.
|
boolean |
isPlayer()
Get if the user is a player or not.
|
void |
setActivationCode(String activationCode)
Set the user activation key.
|
void |
setAddress(String address)
Set the address of the user.
|
void |
setBirthDate(Date birthDate)
Set the birth date of the user.
|
void |
setConfirmed(boolean confirmed)
Set the confirmation of the user account.
|
void |
setCountry(String country)
Set the country of the user.
|
void |
setDeleted(Date deleted)
Set the deleted date of the user.
|
void |
setEmail(String email)
Set the email of the user.
|
void |
setFacebookProfile(String facebookProfile)
Set the Facebook URL of the user.
|
void |
setInstagramProfile(String instagramProfile)
Set the Instagram URL of the user.
|
void |
setLastName(String lastName)
Set the last name of the user.
|
void |
setLocation(String location)
Set the location of the user.
|
void |
setLogin(String login)
Set the login of the user.
|
void |
setName(String name)
Set the name of the user.
|
void |
setNumberID(String numberID)
Set the identification (DNI, Passport..) of the user.
|
void |
setPassword(String password)
Set the password encrypted of the user.
|
void |
setPhoneNumber(String phoneNumber)
Set the phoneNumber of the user.
|
void |
setPlayer(boolean isPlayer)
Set if the user will be a player or not.
|
void |
setPostalCode(int postalCode)
Set the postal code of the user.
|
void |
setProvince(String province)
Set the province of the user.
|
void |
setTwitterProfile(String twitterProfile)
Set the Twitter URL of the user.
|
public User(String login, String email, String password)
This method will create a new User in the Database with the 'confirmed' attribute as false. We do that because the first time a user registers correctly, the account will not be activated since the start, the user has to validate it.
login - name or whatever the user wants and it will be used to enter the
webemail - user“s email so the system can send the confirmation, news...password - string that the user will use to enter the webpublic User()
public String getPassword()
public void setPassword(String password)
password - string that will be used for the user to loginpublic String getLogin()
public void setLogin(String login)
login - the login of the userpublic String getEmail()
public void setEmail(String email)
email - the email of the userpublic boolean isConfirmed()
public void setConfirmed(boolean confirmed)
confirmed - the value of the confirmationpublic Date getDeleted()
public void setDeleted(Date deleted)
deleted - The deleted day of the userpublic String getName()
public void setName(String name)
name - the name of the userpublic String getLastName()
public void setLastName(String lastName)
lastName - the last name of the userpublic Date getBirthDate()
public void setBirthDate(Date birthDate)
birthDate - the birth date of the userpublic String getNumberID()
public void setNumberID(String numberID)
numberID - the identification of the userpublic String getCountry()
public void setCountry(String country)
country - the country of the userpublic String getProvince()
public void setProvince(String province)
province - the province of the userpublic String getLocation()
public void setLocation(String location)
location - the location of the userpublic String getAddress()
public void setAddress(String address)
address - the address of the userpublic int getPostalCode()
public void setPostalCode(int postalCode)
postalCode - the postal code of the userpublic String getPhoneNumber()
public void setPhoneNumber(String phoneNumber)
phoneNumber - the phoneNumber of the userpublic String getFacebookProfile()
public void setFacebookProfile(String facebookProfile)
facebookProfile - the Facebook URL of the userpublic String getTwitterProfile()
public void setTwitterProfile(String twitterProfile)
twitterProfile - the Twitter URL of the userpublic String getInstagramProfile()
public void setInstagramProfile(String instagramProfile)
instagramProfile - the Instagram URL of the userpublic boolean isPlayer()
public void setPlayer(boolean isPlayer)
isPlayer - true if the user will be a player, false otherwisepublic String getActivationCode()
public void setActivationCode(String activationCode)
activationCode - random string, unique for that userpublic String getAddressFormated()
Copyright © 2017. All rights reserved.