Class FlightEliteScore
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.econ.FlightEliteScore
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,AuthoredBean
,EliteTotals
,IDBean
,Cacheable
A bean to store Flight Report Elite point data.
- Since:
- 9.2
- Version:
- 11.1
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a score entry.boolean
int
Returns the Author of this bean.int
getBonus()
Return the bonus Elite points for this flight.int
Returns the great circle distance of this flight.Returns the Pilot's Elite status level at the time of this flight.Returns the point entries for this flight.final int
getLegs()
Returns the number of flight legs.int
Returns the total Elite points for this flight.boolean
Returns whether to ignore flight leg and distance for aggregation purposes.int
getYear()
Returns the Pilot's Elite status year at the time of this flight.void
setAuthorID
(int id) Updates the author of this bean.void
setDistance
(int dst) Updates the great circle distance of this flight.void
setEliteLevel
(String levelName, int year) Updates the Pilot's Elite level at the time of this flight.void
setScoreOnly
(boolean scoreOnly) Updates whether to ignore flight leg and distance for aggregation purpose.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, getHexID, getID, hashCode, setID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.deltava.beans.econ.EliteTotals
isZero
-
Constructor Details
-
FlightEliteScore
public FlightEliteScore(int id) Creates the bean.- Parameters:
id
- the Flight Report database ID
-
-
Method Details
-
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 interfaceEliteTotals
- Returns:
- the number of legs
-
getDistance
public int getDistance()Returns the great circle distance of this flight.- Specified by:
getDistance
in interfaceEliteTotals
- Returns:
- the distance in miles
-
getPoints
public int getPoints()Returns the total Elite points for this flight.- Specified by:
getPoints
in interfaceEliteTotals
- 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
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 interfaceAuthoredBean
- Returns:
- the author's database ID
- See Also:
-
setEliteLevel
Updates the Pilot's Elite level at the time of this flight.- Parameters:
levelName
- the EliteLevel nameyear
- 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 interfaceAuthoredBean
- Parameters:
id
- the author's database ID.- See Also:
-
add
Adds a score entry.- Parameters:
amt
- the number of pointsmsg
- the entry messageisBonus
- TRUE if bonus points, otherwise FALSE
-
equals
- Overrides:
equals
in classDatabaseBean
-