@Entity public class UserAccount extends AbstractEntity<UserAccountIdentifier>
| Constructor and Description |
|---|
UserAccount() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Role role)
Adds a
Role to the UserAccount. |
String |
getEmail() |
String |
getFirstname() |
UserAccountIdentifier |
getId()
Get the unique identifier of this
UserAccount. |
String |
getLastname() |
Password |
getPassword() |
org.springframework.data.util.Streamable<Role> |
getRoles() |
String |
getUsername()
Returns the user's username.
|
boolean |
hasRole(Role role)
Checks if a
UserAccount has a specific Role |
boolean |
isEnabled() |
boolean |
remove(Role role)
Removes a
Role from a UserAccount. |
void |
setEmail(String email) |
void |
setEnabled(boolean enabled) |
void |
setFirstname(String firstname) |
void |
setLastname(String lastname) |
equals, hashCode, isNewpublic UserAccountIdentifier getId()
UserAccount.UserAccountIdentifier of this UserAccountpublic String getUsername()
public boolean add(Role role)
Role to the UserAccount.role - role which the user will receive, must not be null.public boolean remove(Role role)
Role from a UserAccount.role - role which will be removed from user, must not be null.public boolean hasRole(Role role)
UserAccount has a specific Rolerole - Role for which the user will be checked for, must not be null.role was granted to userpublic org.springframework.data.util.Streamable<Role> getRoles()
Streamable/code> with all Roles of the userpublic Password getPassword()
public String getFirstname()
public void setFirstname(String firstname)
public String getLastname()
public void setLastname(String lastname)
public String getEmail()
public void setEmail(String email)
public boolean isEnabled()
public void setEnabled(boolean enabled)
Copyright © 2018. All rights reserved.