rsvp.model
Class Response

java.lang.Object
  extended by rsvp.model.Response
All Implemented Interfaces:
java.io.Serializable, ResponseInterface

public class Response
extends java.lang.Object
implements java.io.Serializable, ResponseInterface

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface rsvp.model.ResponseInterface
MAYBE, NO, serialVersionUID, YES
 
Constructor Summary
Response()
           
 
Method Summary
 java.lang.String getComment()
          Gets this Response's comment.
 EmailAddressInterface getEmail()
          Gets the email address of the respondent.
 int getStatus()
          Returns the status of this response: one of Response.YES, Response.NO, or Response.MAYBE.
 void setComment(java.lang.String comment)
          Sets the comment for this Response.
 void setEmail(EmailAddressInterface email)
          Sets the email address of the respondent.
 void setStatus(int status)
          Sets the status of this response; throws a BogusParameterException if the status supplied is invalid.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response

public Response()
Method Detail

getEmail

public EmailAddressInterface getEmail()
Description copied from interface: ResponseInterface
Gets the email address of the respondent.

Specified by:
getEmail in interface ResponseInterface
Returns:
the email address of the respondent.

setEmail

public void setEmail(EmailAddressInterface email)
Description copied from interface: ResponseInterface
Sets the email address of the respondent.

Specified by:
setEmail in interface ResponseInterface
Parameters:
email - a valid EmailAddress

getComment

public java.lang.String getComment()
Description copied from interface: ResponseInterface
Gets this Response's comment.

Specified by:
getComment in interface ResponseInterface
Returns:
this Response's comment, as a String.

setComment

public void setComment(java.lang.String comment)
Description copied from interface: ResponseInterface
Sets the comment for this Response.

Specified by:
setComment in interface ResponseInterface
Parameters:
comment - a String representing a comment.

getStatus

public int getStatus()
Description copied from interface: ResponseInterface
Returns the status of this response: one of Response.YES, Response.NO, or Response.MAYBE.

Specified by:
getStatus in interface ResponseInterface
Returns:
an int, one of Response.YES, Response.NO, or Response.MAYBE.

setStatus

public void setStatus(int status)
Description copied from interface: ResponseInterface
Sets the status of this response; throws a BogusParameterException if the status supplied is invalid.

Precondition: The supplied status must be Response.YES, Response.NO, or Response.MAYBE. If a different status is supplied, this method must throw a BogusParameterException.

Specified by:
setStatus in interface ResponseInterface
Parameters:
status - one of Response.YES, Response.NO, or Response.MAYBE.