@Entity public class UserAccount extends AbstractEntity<UserAccountIdentifier>
| Modifier and Type | Method and Description |
|---|---|
boolean |
addRole(Role role)
Adds a
Role to a User |
java.lang.String |
getEmail() |
java.lang.String |
getFirstname() |
UserAccountIdentifier |
getIdentifier()
Get the unique identifier of this
User. |
java.lang.String |
getLastname() |
Password |
getPassword() |
java.lang.Iterable<Role> |
getRoles() |
boolean |
hasRole(Role role)
Checks if a
User has a specific Role |
boolean |
isEnabled() |
boolean |
removeRole(Role role)
Removes a
Role from a User. |
void |
setEmail(java.lang.String email) |
void |
setFirstname(java.lang.String firstname) |
void |
setLastname(java.lang.String lastname) |
equals, hashCodepublic final UserAccountIdentifier getIdentifier()
User.getIdentifier in class AbstractEntity<UserAccountIdentifier>UserAccountIdentifier of this UserAccountpublic boolean addRole(Role role)
Role to a Userrole - role which the user will
receive.java.lang.NullPointerException - if role is nullpublic boolean removeRole(Role role)
Role from a User.role - role which will be removed from
userjava.lang.NullPointerException - if role is nullpublic boolean hasRole(Role role)
User has a specific Rolerole - Role for which the user
will be checked for.role was granted to
userjava.lang.NullPointerException - if role is nullpublic java.lang.Iterable<Role> getRoles()
Iterable/code> with all Roles of the userpublic Password getPassword()
public boolean isEnabled()
public java.lang.String getFirstname()
public void setFirstname(java.lang.String firstname)
public java.lang.String getLastname()
public void setLastname(java.lang.String lastname)
public java.lang.String getEmail()
public void setEmail(java.lang.String email)