public class Role extends BaseObject implements Serializable, org.springframework.security.GrantedAuthority
| Constructor and Description |
|---|
Role()
Default constructor - creates a new instance with no values set.
|
Role(String name)
Create a new instance and set the name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
boolean |
equals(Object o)
Compares object equality.
|
String |
getAuthority() |
String |
getDescription() |
Long |
getId() |
String |
getName() |
int |
hashCode()
When you override equals, you should override hashCode.
|
void |
setDescription(String description) |
void |
setId(Long id) |
void |
setName(String name) |
String |
toString()
Returns a multi-line String with key=value pairs.
|
public Role()
public Role(String name)
name - name of the role.public Long getId()
public String getAuthority()
getAuthority in interface org.springframework.security.GrantedAuthorityorg.acegisecurity.GrantedAuthority#getAuthority()public String getName()
public String getDescription()
public void setId(Long id)
public void setName(String name)
public void setDescription(String description)
public boolean equals(Object o)
equals in class BaseObjecto - object to compare topublic int hashCode()
hashCode in class BaseObjectpublic String toString()
toString in class BaseObjectpublic int compareTo(Object o)
compareTo in interface ComparableCopyright © 2015. All rights reserved.