@Entity
public class SecurityRole
extends com.whitestein.lsps.common.VersionedAbstractEntity
implements java.io.Serializable
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | FINDQuery name. | 
| static java.lang.String | FIND_ALLQuery name. | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | SecurityRole()Constructor needed for JPA-specific purposes. | 
|   | SecurityRole(java.lang.String name)Create new  SecurityRoleinstance with thenameproperty
 set to the value given by thenameargument. | 
| Modifier and Type | Method and Description | 
|---|---|
| SecurityRole | addRight(java.lang.String rightName)Adds the right specified be given  rightNameargument to the set
 of rights that belong to this security role. | 
| boolean | equals(java.lang.Object obj) | 
| java.lang.String | getName()Returns the name of the security role. | 
| java.util.Set<java.lang.String> | getRights()Returns a set of rights that are assigned to this security role. | 
| int | hashCode() | 
| boolean | hasRight(java.lang.String right)Returns  trueif this security role has givenrightassigned, otherwise returnsfalse. | 
| Right | removeRight(java.lang.String rightName)Removes the right identified by given  rightNameand returns theRightinstance (JPA entity) that has just been removed. | 
| void | setName(java.lang.String name)Sets the name of the security role. | 
| java.lang.String | toString() | 
public static final java.lang.String FIND
public static final java.lang.String FIND_ALL
protected SecurityRole()
public SecurityRole(java.lang.String name)
SecurityRole instance with the name property
 set to the value given by the name argument.name - The name of the security role. Cannot be blank.java.lang.NullPointerException - (unchecked) If the name argument is null.java.lang.IllegalArgumentException - (unchecked) If the name argument contains just
             whitespace characters.public java.lang.String getName()
public void setName(java.lang.String name)
name - The new name of the security role. Cannot be blank.java.lang.NullPointerException - (unchecked) If the name argument is null.java.lang.IllegalArgumentException - (unchecked) If the name argument contains just
             whitespace characters.public java.util.Set<java.lang.String> getRights()
public boolean hasRight(java.lang.String right)
true if this security role has given right
 assigned, otherwise returns false.right - The name of the right to check for presence.true if this security role has given right
         assigned, otherwise returns false.public SecurityRole addRight(java.lang.String rightName)
rightName argument to the set
 of rights that belong to this security role. Returns this
 SecurityRole instance.rightName - The name of the right to add to the security role.SecurityRole instance.public Right removeRight(java.lang.String rightName)
rightName and returns the
 Right instance (JPA entity) that has just been removed.rightName - The name of the right to remove from this security role.Right instance (JPA entity).public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.