org.norther.tammi.root.realm
Class SimplePersistentRole

java.lang.Object
  extended by org.norther.tammi.root.realm.SimplePersistentRole
All Implemented Interfaces:
Serializable, Cloneable, PersistentRole
Direct Known Subclasses:
IdBasedPersistentRole

public class SimplePersistentRole
extends Object
implements PersistentRole, Serializable, Cloneable

The default implementation of PersistentRole.

Version:
$Id: SimplePersistentRole.java,v 1.10 2009/09/28 15:08:35 cvsimp Exp $
Author:
Marketta Priha
See Also:
Serialized Form

Constructor Summary
SimplePersistentRole()
          The default constructor.
SimplePersistentRole(String name)
          Constructs a new role.
 
Method Summary
 Object clone()
           
 boolean equals(Object other)
           
 String getDescription()
          Gets the description of the role.
 Object getId()
          Gets the unique id of the role.
 String getName()
          Gets the role to be used in authorization i.e.
 String getUsername()
          Gets the username of this role when applying user specific roles.
 int hashCode()
           
 void setDescription(String descr)
          Sets the description of the role.
 void setId(Object id)
          Sets the unique id of the role.
 void setName(String name)
          Sets the role to be used in authorization i.e.
 void setUsername(String name)
          Sets the username of this role when applying user specific roles.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimplePersistentRole

public SimplePersistentRole()
The default constructor.


SimplePersistentRole

public SimplePersistentRole(String name)
Constructs a new role.

Parameters:
name - the role name.
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getId

public Object getId()
Description copied from interface: PersistentRole
Gets the unique id of the role.

Specified by:
getId in interface PersistentRole
Returns:
the user id.

setId

public void setId(Object id)
Description copied from interface: PersistentRole
Sets the unique id of the role.

Specified by:
setId in interface PersistentRole
Parameters:
id - the user id.

getName

public String getName()
Description copied from interface: PersistentRole
Gets the role to be used in authorization i.e. "guest".

Specified by:
getName in interface PersistentRole
Returns:
the role name.

setName

public void setName(String name)
Description copied from interface: PersistentRole
Sets the role to be used in authorization i.e. "guest".

Specified by:
setName in interface PersistentRole
Parameters:
name - the role name.

getDescription

public String getDescription()
Description copied from interface: PersistentRole
Gets the description of the role.

Specified by:
getDescription in interface PersistentRole
Returns:
the description.

setDescription

public void setDescription(String descr)
Description copied from interface: PersistentRole
Sets the description of the role.

Specified by:
setDescription in interface PersistentRole
Parameters:
descr - the description.

getUsername

public String getUsername()
Gets the username of this role when applying user specific roles.

Returns:
the username.

setUsername

public void setUsername(String name)
Sets the username of this role when applying user specific roles.

Parameters:
name - the username.


Copyright © 2004 The Norther Organization. All rights reserved.