org.openmrs.notification
Class AlertRecipient

java.lang.Object
  extended by org.openmrs.notification.AlertRecipient
All Implemented Interfaces:
java.io.Serializable

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

This class is essentially a wrapper for the user object. The alert is assigned to each recipient. A recipient then has either "read" the alert or has not.

See Also:
Alert, Serialized Form

Constructor Summary
AlertRecipient()
          Default empty constructor
AlertRecipient(Alert a)
          Initializes a recipient with the given alert
AlertRecipient(Alert a, User recipient)
          Initializes a recipient with the given alert and recipient/user
AlertRecipient(User user, java.lang.Boolean read)
          Initializes a recipient with the given user
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Alert getAlert()
           
 java.lang.Boolean getAlertRead()
           
 java.util.Date getDateChanged()
           
 User getRecipient()
           
 int hashCode()
           
 java.lang.Boolean isAlertRead()
           
 void setAlert(Alert alert)
           
 void setAlertRead(java.lang.Boolean alertRead)
           
 void setDateChanged(java.util.Date dateChanged)
           
 void setRecipient(User user)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlertRecipient

public AlertRecipient()
Default empty constructor


AlertRecipient

public AlertRecipient(Alert a)
Initializes a recipient with the given alert


AlertRecipient

public AlertRecipient(Alert a,
                      User recipient)
Initializes a recipient with the given alert and recipient/user


AlertRecipient

public AlertRecipient(User user,
                      java.lang.Boolean read)
Initializes a recipient with the given user

Parameters:
read -
user -
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

getAlert

public Alert getAlert()
Returns:
Returns the alert.

setAlert

public void setAlert(Alert alert)
Parameters:
alert - The alert to set.

getDateChanged

public java.util.Date getDateChanged()
Returns:
Returns the date this alert was changed

setDateChanged

public void setDateChanged(java.util.Date dateChanged)
Parameters:
dateChanged - The date this alert was changed

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isAlertRead

public java.lang.Boolean isAlertRead()
Returns:
Returns the read status

getAlertRead

public java.lang.Boolean getAlertRead()
See Also:
getAlertRead()

setAlertRead

public void setAlertRead(java.lang.Boolean alertRead)
Parameters:
alertRead - The alertRead to set.

getRecipient

public User getRecipient()
Returns:
Returns the recipient/user.

setRecipient

public void setRecipient(User user)
Parameters:
user - The recipient/user to set.

OpenMRS-trunk

Generated May 29 2008 02:01 AM. NOTE - these libraries are in active development and subject to change