@Entity public class User extends Object implements Serializable
| Constructor and Description |
|---|
User()
Constructor a new instance of
User This constructor is empty
because is required |
User(String login,
String password,
String name,
String email)
Constructor with parameters
User |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventAssist(Event event)
Assign the event parameter to an user and increase the participants
number for that event
|
List<Event> |
getCreatedEventList()
Returns the List of the created events
|
String |
getEmail()
Returns the email of the user
|
List<Event> |
getEventsAssistList()
Returns the List of the events assistants
|
int |
getId()
Returns the login of this user.
|
String |
getLogin()
Returns the login of the user
|
String |
getName()
Returns the name of the user
|
String |
getPassword()
Returns the password encrypted
|
String |
getRole()
Returns the role of user
|
boolean |
isActive()
Returns the state of the user
|
void |
setActive(boolean active)
Sets the state of the user for inactive or active
|
void |
setCreatedEventList(List<Event> createdEventList)
Sets the list of the created events
|
void |
setEmail(String email)
Sets the email of the user
|
void |
setLogin(String login)
Sets the login of the user
|
void |
setName(String name)
Sets the name of the user
|
void |
setPassword(String password)
Sets the password of the user.
|
void |
setRole(String role)
Sets the role of the user
|
public User()
User This constructor is empty
because is requiredpublic int getId()
public String getPassword()
public void setPassword(String password)
password - the password of the userIllegalArgumentException - If the password is 255 characters long or less than 1
characterpublic String getName()
public void setName(String name)
name - the name of the userIllegalArgumentException - If the name is 50 characters long or less than 1 characterpublic String getEmail()
public void setEmail(String email)
email - the email of the userIllegalArgumentException - If the email is 50 characters long or less than 1 characterpublic boolean isActive()
public void setActive(boolean active)
active - the state of the userpublic String getRole()
public void setRole(String role)
role - the role of the userIllegalArgumentException - If the role is 10 characters long or less than 1 characterpublic String getLogin()
public void setLogin(String login)
login - the login of the userIllegalArgumentException - If the login is 15 characters long or less than 1 characterpublic List<Event> getEventsAssistList()
public List<Event> getCreatedEventList()
public void setCreatedEventList(List<Event> createdEventList)
createdEventList - The list of the created eventspublic void addEventAssist(Event event)
event - the event where the user participatesNullPointerException - if null is passed as parameterCopyright © 2016. All rights reserved.