org.norther.tammi.root.realm
Class SimplePersistentUser

java.lang.Object
  extended by org.norther.tammi.root.realm.SimplePersistentUser
All Implemented Interfaces:
Serializable, Cloneable, PersistentUser
Direct Known Subclasses:
IdBasedPersistentUser

public class SimplePersistentUser
extends Object
implements PersistentUser, Serializable, Cloneable

The default implementation of PersistentUser.

Author:
Marketta Priha
See Also:
Serialized Form

Constructor Summary
SimplePersistentUser()
          The default constructor.
SimplePersistentUser(String name, String pswd)
          Constructs a new user.
 
Method Summary
 Object clone()
           
 boolean equals(Object other)
           
 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.
 int hashCode()
           
 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.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePersistentUser

public SimplePersistentUser()
The default constructor.


SimplePersistentUser

public SimplePersistentUser(String name,
                            String pswd)
Constructs a new user.

Parameters:
name - the username.
pswd - the password.
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

getId

public Object getId()
Description copied from interface: PersistentUser
Gets the unique id of the persistent user.

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

setId

public void setId(Object id)
Description copied from interface: PersistentUser
Sets the unique id of the persistent user.

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

getUsername

public String getUsername()
Description copied from interface: PersistentUser
Gets the unique name for login of the persistent user.

Specified by:
getUsername in interface PersistentUser
Returns:
the username.

setUsername

public void setUsername(String name)
Description copied from interface: PersistentUser
Sets the unique name for login of the persistent user.

Specified by:
setUsername in interface PersistentUser
Parameters:
name - the username.

getPassword

public String getPassword()
Description copied from interface: PersistentUser
Gets the password of the persistent user.

Specified by:
getPassword in interface PersistentUser
Returns:
the password.

setPassword

public void setPassword(String pswd)
Description copied from interface: PersistentUser
Sets the password of the persistent user.

Specified by:
setPassword in interface PersistentUser
Parameters:
pswd - the password.

getLocale

public String getLocale()
Description copied from interface: PersistentUser
Gets the locale of the persistent user.

Specified by:
getLocale in interface PersistentUser
Returns:
the locale.

setLocale

public void setLocale(String loc)
Description copied from interface: PersistentUser
Sets the locale of the persistent user.

Specified by:
setLocale in interface PersistentUser
Parameters:
loc - the locale.

getRoles

public Collection getRoles()
Description copied from interface: PersistentUser
Gets the roles of the persistent user.

Specified by:
getRoles in interface PersistentUser
Returns:
the roles as a read-only collection of PersistentRole objects.

setRoles

public void setRoles(Collection roles)
Description copied from interface: PersistentUser
Sets the roles of the persistent user.

Specified by:
setRoles in interface PersistentUser
Parameters:
roles - the roles as a collection of PersistentRole objects.


Copyright © 2004 The Norther Organization. All rights reserved.