@Entity public class User extends BaseEntity
Constructor and Description |
---|
User() |
User(String username,
String password,
String nickname,
Set<Role> roles,
boolean enabled) |
Modifier and Type | Method and Description |
---|---|
void |
addRole(Role role) |
void |
addRoles(Set<Role> roles) |
String |
getNickname() |
String |
getPassword() |
Set<Role> |
getRoles() |
String |
getUsername() |
boolean |
hasAnyAuthority(String... authorities)
Returns if this user has any of the specified authorities.
|
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
void |
setNickname(String nickname) |
void |
setPassword(String password) |
void |
setRoles(Set<Role> roles) |
void |
setUsername(String username) |
equals, getCreatedBy, getCreatedDate, getId, getLastModifiedBy, getLastModifiedDate, getVersion, hashCode, isNew, setCreatedBy, setCreatedDate, setId, setLastModifiedBy, setLastModifiedDate, setVersion
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getNickname()
public void setNickname(String nickname)
public void addRole(Role role)
public boolean hasAnyAuthority(String... authorities)
authorities
- requires at least one of the authorities (i.e.
"ROLE_USER","ROLE_ADMIN" would mean either "ROLE_USER" or "ROLE_ADMIN"
is required).public boolean isEnabled()
public void setEnabled(boolean enabled)
Copyright © 2019. All rights reserved.