Class TextMessage
java.lang.Object
org.deltava.beans.acars.TextMessage
- All Implemented Interfaces:
Comparable<TextMessage>,AuthoredBean
A bean to store saved ACARS text messages.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(TextMessage m2) Compares two messages by comparing their dates.intReturns the Author of this bean.getDate()Returns the date the message was sent.Returns the message text.intReturns the database ID of the message recipient.voidsetAuthorID(int id) Updates the author of this bean.voidsetMessage(String msg) Updates the message text.voidsetRecipientID(int id) Updates the Recipient of the message.
-
Constructor Details
-
TextMessage
Creates a new Text Message bean.- Parameters:
dt- the date/time of the message
-
-
Method Details
-
getDate
Returns the date the message was sent.- Returns:
- the date/time of the message
-
getAuthorID
public int getAuthorID()Description copied from interface:AuthoredBeanReturns the Author of this bean.- Specified by:
getAuthorIDin interfaceAuthoredBean- Returns:
- the author's database ID
- See Also:
-
getRecipientID
public int getRecipientID()Returns the database ID of the message recipient.- Returns:
- the database ID, or zero if a public message
- See Also:
-
getMessage
-
setAuthorID
public void setAuthorID(int id) Description copied from interface:AuthoredBeanUpdates the author of this bean.- Specified by:
setAuthorIDin interfaceAuthoredBean- Parameters:
id- the author's database ID.- See Also:
-
setRecipientID
public void setRecipientID(int id) Updates the Recipient of the message.- Parameters:
id- the Recipient's database ID, or zero for a public message- Throws:
IllegalArgumentException- if id is negative- See Also:
-
setMessage
Updates the message text.- Parameters:
msg- the message text- Throws:
NullPointerException- if msg is null- See Also:
-
compareTo
Compares two messages by comparing their dates.- Specified by:
compareToin interfaceComparable<TextMessage>
-