ajax.database
Class User

java.lang.Object
  extended by ajax.database.User
All Implemented Interfaces:
java.io.Serializable

public class User
extends java.lang.Object
implements java.io.Serializable

Hibernate entity bean for the User table

Author:
Adam J. Kaplan
See Also:
Serialized Form

Constructor Summary
User()
           
User(java.lang.String name, java.lang.String email)
          Convienance constructor for this class.
 
Method Summary
 java.util.Date getAdded()
          Get Wrapper for the added column of the database.
 java.lang.String getEmail()
          Get Wrapper for the email column of the database.
 java.util.Date getLast_action()
          Get Wrapper for the last_action column of the database.
 java.util.Date getLast_heartbeat()
          Get Wrapper for the last_heartbeat column of the database.
 java.util.List getPendingMessages()
           
 java.lang.Integer getUserid()
           
 java.lang.String getUsername()
          Get Wrapper for the username column of the database.
 void setAdded(java.util.Date added)
          Set wrapper for the added column of the database table
 void setEmail(java.lang.String email)
          Set wrapper for the email column of the database table
 void setLast_action(java.util.Date last_action)
          Set wrapper for the last_action column of the database table
 void setLast_heartbeat(java.util.Date last_heartbeat)
          Set wrapper for the last_heartbeat column of the database table
 void setPendingMessages(java.util.List pendingMessages)
          Set wrapper for the hibernate-mapped message list for this user
 void setUserid(java.lang.Integer userid)
          Set wrapper for the userid column of the database table
 void setUsername(java.lang.String username)
          Set wrapper for the username column of the database table
 boolean validateCredentials(java.lang.String email)
          Simply for convienance, compares a string to this users email
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User()

User

public User(java.lang.String name,
            java.lang.String email)
Convienance constructor for this class.

Method Detail

getAdded

public java.util.Date getAdded()
Get Wrapper for the added column of the database.

Returns:
A Date object representing the time added

setAdded

public void setAdded(java.util.Date added)
Set wrapper for the added column of the database table

Parameters:
added - the new value

getEmail

public java.lang.String getEmail()
Get Wrapper for the email column of the database.

Returns:
A String representing the users email

setEmail

public void setEmail(java.lang.String email)
Set wrapper for the email column of the database table

Parameters:
email - the new value

getLast_action

public java.util.Date getLast_action()
Get Wrapper for the last_action column of the database.

Returns:
A Date representing the users last action

setLast_action

public void setLast_action(java.util.Date last_action)
Set wrapper for the last_action column of the database table

Parameters:
last_action - the new value

getLast_heartbeat

public java.util.Date getLast_heartbeat()
Get Wrapper for the last_heartbeat column of the database.

Returns:
A Date object representing the users last heartbeat added

setLast_heartbeat

public void setLast_heartbeat(java.util.Date last_heartbeat)
Set wrapper for the last_heartbeat column of the database table

Parameters:
last_heartbeat - the new value

getUserid

public java.lang.Integer getUserid()

setUserid

public void setUserid(java.lang.Integer userid)
Set wrapper for the userid column of the database table

Parameters:
userid - the new value

getUsername

public java.lang.String getUsername()
Get Wrapper for the username column of the database.

Returns:
A string representing the users name

setUsername

public void setUsername(java.lang.String username)
Set wrapper for the username column of the database table

Parameters:
username - the new value

setPendingMessages

public void setPendingMessages(java.util.List pendingMessages)
Set wrapper for the hibernate-mapped message list for this user

Parameters:
pendingMessages - A list of PendingMessage objects to replace the existing messages

validateCredentials

public boolean validateCredentials(java.lang.String email)
Simply for convienance, compares a string to this users email

Parameters:
email - the string to compare against
Returns:
True if the strings are identical

getPendingMessages

public java.util.List getPendingMessages()