@Entity public class User extends Object implements Serializable
| Constructor and Description |
|---|
User(String login,
String password,
String email)
Constructs a new instance of
User with the USER role. |
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(String password)
Changes the password of the user.
|
boolean |
equals(Object obj) |
String |
getEmail()
Returns the email of the user.
|
String |
getLogin()
Returns the login of this user.
|
String |
getPassword()
Returns the MD5 of the user's password.
|
Role |
getRole()
Returns the role of the user.
|
int |
hashCode() |
void |
setEmail(String email)
Sets the email of the user.
|
void |
setLogin(String login)
Sets the login of this user.
|
void |
setPassword(String password)
Sets the MD5 password of the user.
|
public String getLogin()
public void setLogin(String login)
login - the login that identifies the user. This parameter must be a
non empty and non null string with a maximum length of
100 chars.NullPointerException - if null is passed as parameter.IllegalArgumentException - if the length of the string passed is not valid.public String getPassword()
public void setPassword(String password)
password - the MD5 password of the user. This parameter must be a non
null MD5 string.NullPointerException - if null is passed as parameter.IllegalArgumentException - if the string passed is not a valid MD5 string.public void changePassword(String password)
password - the raw password of the user. This parameter must be a non
null string with a minimum length of 6 chars.NullPointerException - if the password is null.IllegalArgumentException - if the length of the string passed is not valid.public String getEmail()
public void setEmail(String email)
email - the email of the user.IllegalArgumentException - if the email provided is not a valid email.public Role getRole()
Copyright © 2015. All rights reserved.