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 TypeMethodDescriptionint
compareTo
(TextMessage m2) Compares two messages by comparing their dates.int
Returns the Author of this bean.getDate()
Returns the date the message was sent.Returns the message text.int
Returns the database ID of the message recipient.void
setAuthorID
(int id) Updates the author of this bean.void
setMessage
(String msg) Updates the message text.void
setRecipientID
(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:AuthoredBean
Returns the Author of this bean.- Specified by:
getAuthorID
in 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:AuthoredBean
Updates the author of this bean.- Specified by:
setAuthorID
in 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:
compareTo
in interfaceComparable<TextMessage>
-