Class Warning

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.acars.Warning
All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, CalendarEntry, IDBean, Cacheable

public class Warning extends DatabaseBean implements AuthoredBean, CalendarEntry
A bean to store ACARS content warnings.
Since:
4.0
Version:
8.7
Author:
Luke
See Also:
  • Constructor Details

    • Warning

      public Warning(int userID, int authorID, int score)
      Creates the bean.
      Parameters:
      userID - the datbase ID of the user being warned
      authorID - the database ID of the user warning
      score - the warnings core
  • Method Details

    • getDate

      public Instant getDate()
      Description copied from interface: CalendarEntry
      Returns this entry's date for ordering in the Calendar.
      Specified by:
      getDate in interface CalendarEntry
      Returns:
      the date/time
    • getAuthorID

      public int getAuthorID()
      Description copied from interface: AuthoredBean
      Returns the Author of this bean.
      Specified by:
      getAuthorID in interface AuthoredBean
      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 interface AuthoredBean
      Parameters:
      id - the author's database ID.
      See Also:
    • setDate

      public void setDate(Instant dt)
      Updates the date of the warning.
      Parameters:
      dt - the date/time the user was warned
    • cacheKey

      public Object cacheKey()
      Returns the cache key.
      Specified by:
      cacheKey in interface Cacheable
      Overrides:
      cacheKey in class DatabaseBean
      Returns:
      the cache key for the object
    • hashCode

      public int hashCode()
      Returns the hash code of the database ID/author ID.
      Overrides:
      hashCode in class DatabaseBean