ejel
Class Recipient

java.lang.Object
  extended by ejel.Recipient

public class Recipient
extends java.lang.Object

Represents a recipient's email address


Constructor Summary
Recipient(java.lang.String email)
          The Recipient constructor
Recipient(java.lang.String email, long id)
          The Recipient constructor
 
Method Summary
 java.lang.String getEmailAddress()
          Gets the Recipient object email address
 long getID()
          Gets the optional ID for the email record on a database for example
 boolean isSent()
          Checks if the email is sent to that Recipient
 void setSentStatus()
          Sets to true the sent status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Recipient

public Recipient(java.lang.String email)
          throws java.lang.IllegalArgumentException
The Recipient constructor

Parameters:
email - The Recipient object email address
Throws:
java.lang.IllegalArgumentException

Recipient

public Recipient(java.lang.String email,
                 long id)
          throws java.lang.IllegalArgumentException
The Recipient constructor

Parameters:
email - The Recipient object email address
id - Optional ID for the email record on a database for example
Throws:
java.lang.IllegalArgumentException
Method Detail

getID

public long getID()
Gets the optional ID for the email record on a database for example

Returns:
The optional ID for the email address

getEmailAddress

public java.lang.String getEmailAddress()
Gets the Recipient object email address

Returns:
The Recipient object email address

setSentStatus

public void setSentStatus()
Sets to true the sent status. Used by the sender engine to avoid sending the same email more than once.


isSent

public boolean isSent()
Checks if the email is sent to that Recipient

Returns:
true if the email is already sent to that Recipient