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.intReturns the Author of this bean.getDate()Returns this entry's date for ordering in the Calendar.intgetScore()Returns the warning score.inthashCode()Returns the hash code of the database ID/author ID.voidsetAuthorID(int id) Updates the author of this bean.voidUpdates the date of the warning.Methods inherited from class DatabaseBean
compareTo, equals, getHexID, getID, setID, validateID, validateIDMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:CalendarEntryReturns this entry's date for ordering in the Calendar.- Specified by:
getDatein interfaceCalendarEntry- Returns:
- the date/time
-
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:
-
getScore
public int getScore()Returns the warning score.- Returns:
- the score
-
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:
-
setDate
Updates the date of the warning.- Parameters:
dt- the date/time the user was warned
-
cacheKey
Returns the cache key.- Specified by:
cacheKeyin interfaceCacheable- Overrides:
cacheKeyin classDatabaseBean- Returns:
- the cache key for the object
-
hashCode
public int hashCode()Returns the hash code of the database ID/author ID.- Overrides:
hashCodein classDatabaseBean
-