Class FlightEliteScore

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.econ.FlightEliteScore
All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, EliteTotals, IDBean, Cacheable

public class FlightEliteScore extends DatabaseBean implements AuthoredBean, EliteTotals
A bean to store Flight Report Elite point data.
Since:
9.2
Version:
11.1
Author:
Luke
See Also:
  • Constructor Details

    • FlightEliteScore

      public FlightEliteScore(int id)
      Creates the bean.
      Parameters:
      id - the Flight Report database ID
  • Method Details

    • getEliteLevel

      public String getEliteLevel()
      Returns the Pilot's Elite status level at the time of this flight.
      Returns:
      the EliteLevel name
    • getYear

      public int getYear()
      Returns the Pilot's Elite status year at the time of this flight.
      Returns:
      the EliteLevel year
    • getLegs

      public final int getLegs()
      Description copied from interface: EliteTotals
      Returns the number of flight legs.
      Specified by:
      getLegs in interface EliteTotals
      Returns:
      the number of legs
    • getDistance

      public int getDistance()
      Returns the great circle distance of this flight.
      Specified by:
      getDistance in interface EliteTotals
      Returns:
      the distance in miles
    • getPoints

      public int getPoints()
      Returns the total Elite points for this flight.
      Specified by:
      getPoints in interface EliteTotals
      Returns:
      the total number of points
    • getBonus

      public int getBonus()
      Return the bonus Elite points for this flight.
      Returns:
      the number of bonus points
    • getEntries

      public Collection<EliteScoreEntry> getEntries()
      Returns the point entries for this flight.
      Returns:
      a Collection of EliteScoreEntry beans
    • getScoreOnly

      public boolean getScoreOnly()
      Returns whether to ignore flight leg and distance for aggregation purposes.
      Returns:
      TRUE to ignore leg/distance, otherwise FALSE
    • 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:
    • setEliteLevel

      public void setEliteLevel(String levelName, int year)
      Updates the Pilot's Elite level at the time of this flight.
      Parameters:
      levelName - the EliteLevel name
      year - the EliteLevel year
    • setDistance

      public void setDistance(int dst)
      Updates the great circle distance of this flight.
      Parameters:
      dst - the distance in miles
    • setScoreOnly

      public void setScoreOnly(boolean scoreOnly)
      Updates whether to ignore flight leg and distance for aggregation purpose.
      Parameters:
      scoreOnly - TRUE to only count score, otherwise FALSE
    • 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:
    • add

      public void add(int amt, String msg, boolean isBonus)
      Adds a score entry.
      Parameters:
      amt - the number of points
      msg - the entry message
      isBonus - TRUE if bonus points, otherwise FALSE
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class DatabaseBean