Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.bean
Class SimpleActor  view SimpleActor download SimpleActor.java

java.lang.Object
  extended bycom.RuntimeCollective.webapps.bean.SimpleActor
All Implemented Interfaces:
Actor, EntityBean, java.io.Serializable, User

public abstract class SimpleActor
extends java.lang.Object
implements Actor

A simple abstract implementation of the Actor interface that exposes the properties of the underlying User.

Version:
$Id: SimpleActor.java,v 1.10 2003/09/30 15:13:09 joe Exp $

Field Summary
protected  int id
          The ID of this actor.
protected  User user
          The User that this actor wraps.
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.User
DATABASE_TABLE
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Constructor Summary
SimpleActor()
           
 
Method Summary
 void addRole(int role)
           
 Address getAddress()
           
 java.lang.Object getAttribute(java.lang.String name)
          Get the value of an attribute.
 java.util.Date getCreateDate()
           
 java.lang.String getEmail()
           
 java.lang.String getFirstName()
           
 int getId()
          Get the actor's ID.
 java.lang.String getLastName()
           
 java.lang.String getPassword()
           
 int[] getRoles()
           
 User getUser()
          Get the User that this Actor wraps.
 boolean hasRole(int role)
           
 void removeRole(int role)
           
 void setAddress(Address address)
           
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set the value of an attribute.
 void setCreateDate(java.util.Date createDate)
           
 void setEmail(java.lang.String email)
           
 void setFirstName(java.lang.String firstName)
           
 void setId(int id)
          Set the actor's ID.
 void setLastName(java.lang.String lastName)
           
 void setPassword(java.lang.String password)
           
 void setRoles(int[] roles)
           
 void setUser(User user)
          Set the User that this Actor wraps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
delete, save
 

Field Detail

user

protected User user
The User that this actor wraps.


id

protected int id
The ID of this actor. NB. this will be different from the id of the underlying user.

Constructor Detail

SimpleActor

public SimpleActor()
Method Detail

getUser

public User getUser()
Get the User that this Actor wraps.

Specified by:
getUser in interface Actor

setUser

public void setUser(User user)
Set the User that this Actor wraps.

Specified by:
setUser in interface Actor

getId

public int getId()
Get the actor's ID. NB. this will be different from the id of the underlying user.

Specified by:
getId in interface EntityBean

setId

public void setId(int id)
Set the actor's ID. NB. this will be different from the id of the underlying user.

Specified by:
setId in interface EntityBean

setEmail

public void setEmail(java.lang.String email)
Specified by:
setEmail in interface User

getEmail

public java.lang.String getEmail()
Specified by:
getEmail in interface User

setPassword

public void setPassword(java.lang.String password)
Specified by:
setPassword in interface User

getPassword

public java.lang.String getPassword()
Specified by:
getPassword in interface User

getFirstName

public java.lang.String getFirstName()
Specified by:
getFirstName in interface User

setFirstName

public void setFirstName(java.lang.String firstName)
Specified by:
setFirstName in interface User

getLastName

public java.lang.String getLastName()
Specified by:
getLastName in interface User

setLastName

public void setLastName(java.lang.String lastName)
Specified by:
setLastName in interface User

setCreateDate

public void setCreateDate(java.util.Date createDate)
Specified by:
setCreateDate in interface User

getCreateDate

public java.util.Date getCreateDate()
Specified by:
getCreateDate in interface User

setRoles

public void setRoles(int[] roles)
Specified by:
setRoles in interface User

getRoles

public int[] getRoles()
Specified by:
getRoles in interface User

hasRole

public boolean hasRole(int role)
Specified by:
hasRole in interface User

setAddress

public void setAddress(Address address)
Specified by:
setAddress in interface User

getAddress

public Address getAddress()
Specified by:
getAddress in interface User

addRole

public void addRole(int role)
             throws java.sql.SQLException
Specified by:
addRole in interface User

removeRole

public void removeRole(int role)
                throws java.sql.SQLException
Specified by:
removeRole in interface User

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Get the value of an attribute. Null is returned if the attribute for this name has not been.

Specified by:
getAttribute in interface Actor

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set the value of an attribute.

Specified by:
setAttribute in interface Actor