@Entity public class UserJPA extends Object
| Constructor and Description |
|---|
UserJPA()
Empty constructor for the JPA User.
|
UserJPA(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 |
getEmail()
Get the email of the user.
|
String |
getLogin()
Get the login of the user.
|
String |
getPassword()
Get the password encrypted of the user.
|
boolean |
isConfirmed()
Get if the user is confirmed or not.
|
void |
setConfirmed(boolean confirmed)
Set the confirmation of the user account.
|
void |
setEmail(String email)
Set the email of the user.
|
void |
setLogin(String login)
Set the login of the user.
|
void |
setPassword(String password)
Set the password encrypted of the user.
|
public UserJPA(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 UserJPA()
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 confirmationCopyright © 2017. All rights reserved.