@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. |
User(String login,
String password,
String email,
boolean isAdmin) |
User(String login,
String password,
String email,
String city) |
User(String login,
String password,
String email,
String completeName,
String description,
String fbUrl,
String twUrl,
String personalUrl,
boolean notifications,
byte[] image,
String city)
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 |
getCity()
Gets the value of the variable city
|
String |
getCompleteName()
Returns the complete name of the user.
|
String |
getDescription()
Returns the description of the user.
|
String |
getEmail()
Returns the email of the user.
|
String |
getFbUrl()
Returns the url to the facebook profile of the user.
|
byte[] |
getImage()
Returns the image of the user's profile.
|
String |
getLogin()
Returns the login of this user.
|
String |
getPassword()
Returns the MD5 of the user's password.
|
String |
getPersonalUrl()
Returns the url to the personal page or blog of the user.
|
Role |
getRole()
Returns the role of the user.
|
String |
getTwUrl()
Returns the url to the twitter profile of the user.
|
int |
hashCode() |
boolean |
isNotifications()
|
void |
setCity(String city)
Sets the value of the variable city
|
void |
setCompleteName(String completeName)
Sets the complete name of the user.
|
void |
setDescription(String description)
Sets the description of the user.
|
void |
setEmail(String email)
Sets the email of the user.
|
void |
setFbUrl(String fbUrl)
Sets the url to the facebook profile of the user.
|
void |
setFieldsFrom(User user) |
void |
setImage(byte[] image)
Sets the image of the user's profile.
|
void |
setLogin(String login)
Sets the login of this user.
|
void |
setNotifications(boolean notifications)
Sets the value of the variable notifications
|
void |
setPassword(String password)
Sets the MD5 password of the user.
|
void |
setPersonalUrl(String personalUrl)
Sets the url to the personal page or blog of the user.
|
void |
setTwUrl(String twUrl)
Sets the url to the twitter profile of the user.
|
public User(String login, String password, String email)
User with the USER role.login - the login of the new user. This login must be unique in the
system.password - the raw password of the user.email - the email of the user.public User(String login, String password, String email, String completeName, String description, String fbUrl, String twUrl, String personalUrl, boolean notifications, byte[] image, String city)
User with the USER role.login - the login of the new user. This login must be unique in the
system.password - the raw password of the user.email - the email of the user.completeName - the complete name of the user.description - the description of the user.fbUrl - the link to the user's Facebook page.twUrl - the link to the user's Twitter page.personalUrl - the link to the user's personal web or blog.notifications - if the User wants Notificationimage - the image of the user's profile.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()
public void setCompleteName(String completeName)
completeName - the complete name of the user. This parameter can be an empty
or a null string and the maximum length is 30 chars.IllegalArgumentException - if the length of the string passed is not valid.public String getCompleteName()
public void setDescription(String description)
description - the description of the user. This parameter can be an empty
or a null string and the maximum length is 1000 chars.IllegalArgumentException - if the length of the string passed is not valid.public String getDescription()
public void setFbUrl(String fbUrl)
fbUrl - the url to the facebook profile of the user.IllegalArgumentException - if the length of the string passed is not valid.public String getFbUrl()
public void setTwUrl(String twUrl)
twUrl - the url to the twitter profile of the user.IllegalArgumentException - if the length of the string passed is not valid.public String getTwUrl()
public void setPersonalUrl(String personalUrl)
personalUrl - the url to the personal page or blog of the user.IllegalArgumentException - if the length of the string passed is not valid.public String getPersonalUrl()
public void setImage(byte[] image)
image - the image of the user's profile.public byte[] getImage()
public boolean isNotifications()
true if the User wants to recieve
Notification null otherwisepublic void setNotifications(boolean notifications)
notifications - the value of the variablepublic String getCity()
public void setCity(String city)
city - the value of the variablepublic void setFieldsFrom(User user) throws NullPointerException, IllegalArgumentException
Copyright © 2016. All rights reserved.