|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbr.com.arsmachina.authentication.entity.Permission
public final class Permission
Class that represents a single permission.
| Field Summary | |
|---|---|
static int |
MAXIMUM_NAME_LENGTH
Maximum name length. |
static int |
MINIMUM_NAME_LENGTH
Minimum name length. |
static String |
USER_ROLE_NAME
Name of the role that all users have. |
| Constructor Summary | |
|---|---|
Permission()
No-arg constructor. |
|
Permission(String name)
Constructor that receives a name. |
|
| Method Summary | |
|---|---|
int |
compareTo(Permission o)
|
boolean |
equals(Object obj)
|
Integer |
getId()
Returns the value of the id property. |
String |
getName()
Returns the value of the name property. |
int |
hashCode()
|
void |
setId(Integer id)
Changes the value of the id property. |
void |
setName(String name)
Changes the value of the name property. |
String |
toString()
Returns the name property. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String USER_ROLE_NAME
public static final int MINIMUM_NAME_LENGTH
public static final int MAXIMUM_NAME_LENGTH
| Constructor Detail |
|---|
public Permission()
public Permission(String name)
name - a String. It cannot be null.
IllegalArgumentException - if name is null.| Method Detail |
|---|
public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int compareTo(Permission o)
compareTo in interface Comparable<Permission>Comparable.compareTo(java.lang.Object)public String toString()
name property.
toString in class ObjectString.public Integer getId()
id property.
Integer.public void setId(Integer id)
id property.
id - a Integer.
@NotNull
@Length(min=2,
max=50)
public String getName()
name property.
String.public void setName(String name)
name property.
name - a String.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||