org.norther.tammi.root.realm
Interface PersistentUser

All Known Implementing Classes:
IdBasedPersistentUser, SimplePersistentUser

public interface PersistentUser

The class representing a user in the persistent storage. This class needs to be mapped to a table in a relational database.

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

Author:
Marketta Priha

Method Summary
 Object getId()
          Gets the unique id of the persistent user.
 String getLocale()
          Gets the locale of the persistent user.
 String getPassword()
          Gets the password of the persistent user.
 Collection getRoles()
          Gets the roles of the persistent user.
 String getUsername()
          Gets the unique name for login of the persistent user.
 void setId(Object id)
          Sets the unique id of the persistent user.
 void setLocale(String loc)
          Sets the locale of the persistent user.
 void setPassword(String pswd)
          Sets the password of the persistent user.
 void setRoles(Collection roles)
          Sets the roles of the persistent user.
 void setUsername(String name)
          Sets the unique name for login of the persistent user.
 

Method Detail

getId

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

Returns:
the user id.

setId

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

Parameters:
id - the user id.

getUsername

String getUsername()
Gets the unique name for login of the persistent user.

Returns:
the username.

setUsername

void setUsername(String name)
Sets the unique name for login of the persistent user.

Parameters:
name - the username.

getPassword

String getPassword()
Gets the password of the persistent user.

Returns:
the password.

setPassword

void setPassword(String pswd)
Sets the password of the persistent user.

Parameters:
pswd - the password.

getLocale

String getLocale()
Gets the locale of the persistent user.

Returns:
the locale.

setLocale

void setLocale(String loc)
Sets the locale of the persistent user.

Parameters:
loc - the locale.

getRoles

Collection getRoles()
Gets the roles of the persistent user.

Returns:
the roles as a read-only collection of PersistentRole objects.

setRoles

void setRoles(Collection roles)
Sets the roles of the persistent user.

Parameters:
roles - the roles as a collection of PersistentRole objects.


Copyright © 2004 The Norther Organization. All rights reserved.