public final class SecurityRole
extends java.lang.Object
implements java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
SecurityRole()
Creates new instance.
|
|
SecurityRole(java.lang.Long id,
java.lang.Long entityVersion,
java.lang.String name,
java.util.Collection<java.lang.String> rights)
Creates new instance.
|
|
SecurityRole(java.lang.String name)
Creates new instance.
|
|
SecurityRole(java.lang.String name,
java.util.Collection<java.lang.String> rights)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
java.lang.Long |
getEntityVersion()
Returns the entity version.
|
java.lang.Long |
getId()
Returns the id of the role.
|
java.lang.String |
getName()
Returns the name of the security role.
|
java.util.Set<java.lang.String> |
getRights()
Returns the set of rights that belong to the security role.
|
int |
hashCode() |
java.lang.String |
toString() |
protected SecurityRole()
public SecurityRole(java.lang.String name)
name
- java.lang.NullPointerException
- if name
is nulljava.lang.IllegalArgumentException
- (unchecked) If the name
argument contains just whitespace characters.public SecurityRole(java.lang.String name, java.util.Collection<java.lang.String> rights)
name
- rights
- public SecurityRole(java.lang.Long id, java.lang.Long entityVersion, java.lang.String name, java.util.Collection<java.lang.String> rights)
id
- entityVersion
- name
- The name of the security role (as their unique identifier).
Cannot be blank.rights
- The set of rights that are about to belong to the security
role. Cannot be null
.java.lang.NullPointerException
- (unchecked) If at least one from the arguments is null
.java.lang.IllegalArgumentException
- (unchecked) If the name
argument contains just
whitespace characters.public java.lang.Long getId()
public java.lang.Long getEntityVersion()
public java.lang.String getName()
public java.util.Set<java.lang.String> getRights()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.