org.figure8.join.businessobjects.security
Class User

java.lang.Object
  extended by org.figure8.join.core.EntityObject
      extended by org.figure8.join.businessobjects.security.User
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.security.Principal

public class User
extends EntityObject
implements java.security.Principal

This is en entity representing a User within Join system.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux
See Also:
Serialized Form

Constructor Summary
User()
          Creates a new instance of User.
User(java.lang.String login, java.lang.String password, java.lang.String lastname, java.lang.String firstname)
          Creates a new instance of User with mandatory fields.
 
Method Summary
 java.lang.String getFirstname()
           
 long getId()
          Get this entity unique identifier.
 java.lang.String getLastname()
           
 java.lang.String getLogin()
           
 java.lang.String getMail()
           
 java.lang.String getName()
          Implementation of java.security.Principal getName() method.
 java.lang.String getPassword()
           
 java.lang.String getPhone()
           
 java.lang.String getTeam()
           
 boolean isTransient()
          Tell if this entity has already been persisted into datastore.
 void setFirstname(java.lang.String firstname)
           
 void setId(long id)
          Set this user unique identifier.
 void setLastname(java.lang.String lastname)
           
 void setLogin(java.lang.String login)
           
 void setMail(java.lang.String mail)
           
 void setPassword(java.lang.String password)
           
 void setPhone(java.lang.String phone)
           
 void setTeam(java.lang.String team)
           
 java.lang.String toString()
          Implementation of java.security.Principal toString() method.
 
Methods inherited from class org.figure8.join.core.EntityObject
clone, equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode
 

Constructor Detail

User

public User()
Creates a new instance of User.


User

public User(java.lang.String login,
            java.lang.String password,
            java.lang.String lastname,
            java.lang.String firstname)
Creates a new instance of User with mandatory fields.

Parameters:
login - This user login (must be unique)
password - This user password (encoded)
lastname - This user last name
firstname - This user first name
Method Detail

setId

public void setId(long id)
Set this user unique identifier. This is necessary because User may be retrieved from non Join managed datasources and thus id initialized by different means (other than Hibernate)

Parameters:
id - Long identifier to set

getId

public long getId()
Get this entity unique identifier.

Overrides:
getId in class EntityObject
Returns:
The long identifier

isTransient

public boolean isTransient()
Tell if this entity has already been persisted into datastore.

Overrides:
isTransient in class EntityObject
Returns:
false if entity has already been persisted, true otherwise

getLogin

public java.lang.String getLogin()
Returns:
This user login

setLogin

public void setLogin(java.lang.String login)
Parameters:
login - This user login

getPassword

public java.lang.String getPassword()
Returns:
This user password

setPassword

public void setPassword(java.lang.String password)
Parameters:
password - New password for this user

getLastname

public java.lang.String getLastname()
Returns:
This user lastname

setLastname

public void setLastname(java.lang.String lastname)
Parameters:
lastname - New lastname for this user

getFirstname

public java.lang.String getFirstname()
Returns:
This user firstname

setFirstname

public void setFirstname(java.lang.String firstname)
Parameters:
firstname - New firstname for this user

getMail

public java.lang.String getMail()
Returns:
This user mail address

setMail

public void setMail(java.lang.String mail)
Parameters:
mail - New mail address for this user

getPhone

public java.lang.String getPhone()
Returns:
This user phone number

setPhone

public void setPhone(java.lang.String phone)
Parameters:
phone - New phone number for this user

getTeam

public java.lang.String getTeam()
Returns:
This user team description

setTeam

public void setTeam(java.lang.String team)
Parameters:
team - New team description for this user

getName

public java.lang.String getName()
Implementation of java.security.Principal getName() method. This implementation returns this user uniques identifier : its login.

Specified by:
getName in interface java.security.Principal
Returns:
The user login (business unique identifier)

toString

public java.lang.String toString()
Implementation of java.security.Principal toString() method. This implementation return this user summary : "lastname firstname"

Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object


Copyright © 2005-2008 Join. All Rights Reserved.