com.tootsville
Class MailMessage
java.lang.Object
org.starhope.appius.util.ManagedReferenceHolder
org.starhope.appius.sql.SQLPeerDatum
com.tootsville.MailMessage
- All Implemented Interfaces:
- java.io.Serializable
public class MailMessage
- extends SQLPeerDatum
- Author:
- brpocock
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MailMessage
public MailMessage()
MailMessage
public MailMessage(java.sql.ResultSet row)
throws java.sql.SQLException,
java.lang.NullPointerException
- Parameters:
row
- WRITEME
- Throws:
java.sql.SQLException
- WRITEME
java.lang.NullPointerException
- because com.mysql FUCKS UP!
getByID
public static MailMessage getByID(int id)
throws NotFoundException
- Parameters:
id
- WRITEME
- Returns:
- WRITEME
- Throws:
NotFoundException
- WRITEME
flush
public void flush()
- Specified by:
flush
in class SQLPeerDatum
- See Also:
SQLPeerDatum.flush()
getBody
public java.lang.String getBody()
- Returns:
- the body
getFromID
public int getFromID()
- Returns:
- the fromID
getFromName
public java.lang.String getFromName()
- Returns:
- the fromName
getRead
public java.sql.Timestamp getRead()
- Returns:
- the read
getSent
public java.sql.Timestamp getSent()
- Returns:
- the sent
getSubject
public java.lang.String getSubject()
- Returns:
- the subject
getToID
public int getToID()
- Returns:
- the toID
getToName
public java.lang.String getToName()
- Returns:
- the toName
markAsRead
public void markAsRead()
send
public boolean send()
- Returns:
- WRITEME
setBody
public void setBody(java.lang.String body1)
- Parameters:
body1
- the body to set
setFrom
public void setFrom(User sender)
- TODO: document this method (brpocock, Sep 23, 2009)
- Parameters:
sender
- the sender of the mail message
setFromID
public void setFromID(int fromID1)
- Parameters:
fromID1
- the fromID to set
setRead
public void setRead(java.sql.Timestamp read1)
- Parameters:
read1
- the read to set
setSent
public void setSent(java.sql.Timestamp sent1)
- Parameters:
sent1
- the sent to set
setSubject
public void setSubject(java.lang.String subject1)
- Parameters:
subject1
- the subject to set
setTo
public void setTo(User recipient)
- TODO: document this method (brpocock, Sep 23, 2009)
- Parameters:
recipient
- WRITEME
setToID
public void setToID(int toID1)
- Parameters:
toID1
- the toID to set
toJSON
public org.json.JSONObject toJSON()
- Description copied from class:
SQLPeerDatum
- This is the default SQLPeerDatum implementation of toJSON. This
uses Java reflection and “bean-type” methods to extract the
contents of an object and create a JSON field.
- Overrides:
toJSON
in class SQLPeerDatum
- Returns:
- This object's data, serialized into JSON form.
toJSON
public org.json.JSONObject toJSON(boolean inMailbox)
- TODO: document this method (brpocock, Sep 23, 2009)
- Parameters:
inMailbox
- if true, suppress the body (for use in mailbox
listings)
- Returns:
- the JSON representation of this message (or, if
{inMailbox} is set, only the envelope)