ajax.database
Class PendingMessageBean

java.lang.Object
  extended by ajax.database.PendingMessageBean

public class PendingMessageBean
extends java.lang.Object

Encapsulates the logic for dealing with PendingMessage objects

Author:
Adam J. Kaplan
See Also:
PendingMessage

Constructor Summary
PendingMessageBean()
           
 
Method Summary
static void addMessage(User fromUser, User toUser, java.lang.String mesg)
          Adds message to the queue
static java.util.List getMessages(User toUser)
          Retrieves a list of the messages destined for the user provided
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PendingMessageBean

public PendingMessageBean()
Method Detail

getMessages

public static java.util.List getMessages(User toUser)
                                  throws java.sql.SQLException
Retrieves a list of the messages destined for the user provided

Parameters:
toUser - the user for which to find messages
Returns:
A list of messages
Throws:
java.sql.SQLException
See Also:
PendingMessage

addMessage

public static void addMessage(User fromUser,
                              User toUser,
                              java.lang.String mesg)
                       throws java.lang.Exception
Adds message to the queue

Parameters:
fromUser - The user object that this message is to be destined for
toUser - The user object that this message is to be sent from
mesg - The message
Throws:
java.lang.Exception - if there was an error