org.openmrs.notification
Class AlertRecipient

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

public class AlertRecipient
extends BaseOpenmrsObject
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()
           
 java.lang.Integer getId()
           
 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 setId(java.lang.Integer id)
           
 void setRecipient(User user)
           
 java.lang.String toString()
           
 
Methods inherited from class org.openmrs.BaseOpenmrsObject
getUuid, setUuid
 
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.

getId

public java.lang.Integer getId()
Specified by:
getId in interface OpenmrsObject
Returns:
id - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.getId()

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface OpenmrsObject
Parameters:
id - - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.setId(java.lang.Integer)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change