public class UserRole extends Object
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getId() |
Instant |
getLastUpdated()
Indicates when this record was last updated.
|
String |
getName()
The name for this role.
|
String |
getParentRoleId()
The id of the parent of this role (if any).
|
Set<UserPermissionRef> |
getPermissions()
The permissions that this role has been directly assigned.
|
int |
hashCode() |
boolean |
isArchived()
This entity is soft-deleted instead of hard-deleted, and this field is set to
true
when the entity is soft-deleted. |
void |
setArchived(boolean archived)
This entity is soft-deleted instead of hard-deleted, and this field is set to
true
when the entity is soft-deleted. |
void |
setId(String id) |
void |
setLastUpdated(Instant lastUpdated)
Indicates when this record was last updated.
|
void |
setName(String name)
The name for this role.
|
void |
setParentRoleId(String parentRoleId)
The id of the parent of this role (if any).
|
void |
setPermissions(Set<UserPermissionRef> permissions)
The permissions that this role has been directly assigned.
|
UserRoleRef |
toRef() |
String |
toString() |
public UserRole(String name)
public UserRole()
public UserRoleRef toRef()
public String getId()
public String getName()
public boolean isArchived()
true
when the entity is soft-deleted.public Instant getLastUpdated()
public Set<UserPermissionRef> getPermissions()
parentRoleId.@Nullable public String getParentRoleId()
This role will effectively inherit all of the permissions of its parent and
any ancestors further up in the hierarchy.
In standard CRUD operations, there is validation in place to prevent cycles from being
created in a role's ancestry (role cannot become a parent of itself). However, as roles may
be modified by persistence messages, there may temporarily be broken references or cycles in
this hierarchy. To guard against trouble when fetching a role's ancestry, use
UserRoleAncestryHydrationService.
public void setId(String id)
public void setName(String name)
public void setArchived(boolean archived)
true
when the entity is soft-deleted.public void setLastUpdated(Instant lastUpdated)
public void setPermissions(Set<UserPermissionRef> permissions)
parentRoleId.public void setParentRoleId(@Nullable
String parentRoleId)
This role will effectively inherit all of the permissions of its parent and
any ancestors further up in the hierarchy.
In standard CRUD operations, there is validation in place to prevent cycles from being
created in a role's ancestry (role cannot become a parent of itself). However, as roles may
be modified by persistence messages, there may temporarily be broken references or cycles in
this hierarchy. To guard against trouble when fetching a role's ancestry, use
UserRoleAncestryHydrationService.
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.