Class Warning
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.acars.Warning
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,AuthoredBean
,CalendarEntry
,IDBean
,Cacheable
A bean to store ACARS content warnings.
- Since:
- 4.0
- Version:
- 8.7
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncacheKey()
Returns the cache key.int
Returns the Author of this bean.getDate()
Returns this entry's date for ordering in the Calendar.int
getScore()
Returns the warning score.int
hashCode()
Returns the hash code of the database ID/author ID.void
setAuthorID
(int id) Updates the author of this bean.void
Updates the date of the warning.Methods inherited from class org.deltava.beans.DatabaseBean
compareTo, equals, getHexID, getID, setID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
Warning
public Warning(int userID, int authorID, int score) Creates the bean.- Parameters:
userID
- the datbase ID of the user being warnedauthorID
- the database ID of the user warningscore
- the warnings core
-
-
Method Details
-
getDate
Description copied from interface:CalendarEntry
Returns this entry's date for ordering in the Calendar.- Specified by:
getDate
in interfaceCalendarEntry
- Returns:
- the date/time
-
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:
-
getScore
public int getScore()Returns the warning score.- Returns:
- the score
-
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:
-
setDate
Updates the date of the warning.- Parameters:
dt
- the date/time the user was warned
-
cacheKey
Returns the cache key.- Specified by:
cacheKey
in interfaceCacheable
- Overrides:
cacheKey
in classDatabaseBean
- Returns:
- the cache key for the object
-
hashCode
public int hashCode()Returns the hash code of the database ID/author ID.- Overrides:
hashCode
in classDatabaseBean
-