org.norther.tammi.root.realm
Interface PersistentRole

All Known Implementing Classes:
IdBasedPersistentRole, SimplePersistentRole

public interface PersistentRole

The interface to a class representing a role associated to a user in the persistent storage.

The class implementing this interface needs to be mapped to for instance a table in a relational database.

In OJB, the mapping is based on the extent class name e.g. "org.norther.tammi.core.realm.SimplePersistentRole" and the fields need to match to the attributes of this class i.e. "Name". One of the fields need to be a primary key.

Author:
Marketta Priha

Method Summary
 String getDescription()
          Gets the description of the role.
 Object getId()
          Gets the unique id of the persistent role.
 String getName()
          Gets the role to be used in authorization i.e.
 void setDescription(String descr)
          Sets the description of the role.
 void setId(Object id)
          Sets the unique id of the persistent role.
 void setName(String name)
          Sets the role to be used in authorization i.e.
 

Method Detail

getId

Object getId()
Gets the unique id of the persistent role.

Returns:
the user id.

setId

void setId(Object id)
Sets the unique id of the persistent role.

Parameters:
id - the user id.

getName

String getName()
Gets the role to be used in authorization i.e. "guest".

Returns:
the role name.

setName

void setName(String name)
Sets the role to be used in authorization i.e. "guest".

Parameters:
name - the role name.

getDescription

String getDescription()
Gets the description of the role.

Returns:
the description.

setDescription

void setDescription(String descr)
Sets the description of the role.

Parameters:
descr - the description.


Copyright © 2004 The Norther Organization. All rights reserved.