Class AirlineTotals
java.lang.Object
org.deltava.beans.stats.AirlineTotals
- All Implemented Interfaces:
Serializable,Comparable<AirlineTotals>,Cacheable
A bean to store Airline-wide statistics.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.intcompareTo(AirlineTotals at2) Compares the effective date/times.doubleReturns the total number of hours flown with ACARS.intReturns the number of legs flown with ACARS.intReturns the total number of miles flown with ACARS.intReturns the number of active pilots.intgetAge()Helper method to calculate the age of the airline.longReturns the total number of rows in all database tables.longReturns the total size of all database tables.Returns the effective date of these statistics.doubleReturns the number of hours flown since the start of the current Month.intReturns the number of legs flown since the start of the current Month.intReturns the number of miles flown since the start of the current Month.doubleReturns the total number of hours flown online.intReturns the number of legs flown online.longReturns the total number of miles flown online.doubleReturns the total number of hours flown.intReturns the total number of legs flown.longReturns the total number of miles flown.intReturns the total number of pilots.doubleReturns the number of hours flown since the start of the current Year.intReturns the number of legs flown since the start of the current Year.intReturns the number of miles flown since the start of the current Year.voidsetACARSHours(double hours) Updates the total number of hours flown with ACARS.voidsetACARSLegs(int legs) Updates the total number of legs flown with ACARS.voidsetACARSMiles(int miles) Updates the total number of miles flown with ACARS.voidsetActivePilots(int pilots) Updates the total number of active pilots.voidsetDBRows(long rows) Updates the total number of rows in all database tables.voidsetDBSize(long size) Updates the total size of all database tables.voidsetMTDHours(double hours) Updates the total number of hours flown since the start of the current Month.voidsetMTDLegs(int legs) Updates the total number of legs flown since the start of the current Month.voidsetMTDMiles(int miles) Updates the total number of miles flown since the start of the current Month.voidsetOnlineHours(double hours) Updates the total number of hours flown online.voidsetOnlineLegs(int legs) Updates the total number of legs flown online.voidsetOnlineMiles(long miles) Updates the total number of miles flown online.voidsetTotalHours(double hours) Updates the total number of hours flown.voidsetTotalLegs(int legs) Updates the total number of legs flown.voidsetTotalMiles(long miles) Updates the total number of miles flown.voidsetTotalPilots(int pilots) Updates the total number of pilots.voidsetYTDHours(double hours) Updates the total number of hours flown since the start of the current Year.voidsetYTDLegs(int legs) Updates the total number of legs flown since the start of the current Yes.voidsetYTDMiles(int miles) Updates the total number of miles flown since the start of the current Year.
-
Field Details
-
BIRTHDATE
Date the airline statistics commenced.
-
-
Constructor Details
-
AirlineTotals
Initializes the bean with an effective date.- Parameters:
ed- the effective date/time of the statistics as a 32-bit UNIX timestamp- See Also:
-
-
Method Details
-
getAge
public int getAge()Helper method to calculate the age of the airline.- Returns:
- the age of the airline in days, including the birthdate and today
-
getEffectiveDate
Returns the effective date of these statistics.- Returns:
- the date/time the statistics were generated
-
getTotalLegs
public int getTotalLegs()Returns the total number of legs flown.- Returns:
- the number of legs
- See Also:
-
getTotalMiles
public long getTotalMiles()Returns the total number of miles flown.- Returns:
- the number of miles
- See Also:
-
getTotalHours
public double getTotalHours()Returns the total number of hours flown.- Returns:
- the number of hours
- See Also:
-
getTotalPilots
public int getTotalPilots()Returns the total number of pilots.- Returns:
- the number of pilots
- See Also:
-
getActivePilots
public int getActivePilots()Returns the number of active pilots.- Returns:
- the number of active pilots
- See Also:
-
getOnlineLegs
public int getOnlineLegs()Returns the number of legs flown online.- Returns:
- the number of legs
- See Also:
-
getOnlineHours
public double getOnlineHours()Returns the total number of hours flown online.- Returns:
- the number of hours
- See Also:
-
getOnlineMiles
public long getOnlineMiles()Returns the total number of miles flown online.- Returns:
- the number of miles
- See Also:
-
getACARSLegs
public int getACARSLegs()Returns the number of legs flown with ACARS.- Returns:
- the number of legs
- See Also:
-
getACARSHours
public double getACARSHours()Returns the total number of hours flown with ACARS.- Returns:
- the number of hours
- See Also:
-
getACARSMiles
public int getACARSMiles()Returns the total number of miles flown with ACARS.- Returns:
- the number of miles
- See Also:
-
getMTDLegs
public int getMTDLegs()Returns the number of legs flown since the start of the current Month.- Returns:
- the number of legs
- See Also:
-
getMTDHours
public double getMTDHours()Returns the number of hours flown since the start of the current Month.- Returns:
- the number of hours
- See Also:
-
getMTDMiles
public int getMTDMiles()Returns the number of miles flown since the start of the current Month.- Returns:
- the number of miles
- See Also:
-
getYTDLegs
public int getYTDLegs()Returns the number of legs flown since the start of the current Year.- Returns:
- the number of legs
- See Also:
-
getYTDHours
public double getYTDHours()Returns the number of hours flown since the start of the current Year.- Returns:
- the number of hours
- See Also:
-
getYTDMiles
public int getYTDMiles()Returns the number of miles flown since the start of the current Year.- Returns:
- the number of miles
- See Also:
-
getDBSize
public long getDBSize()Returns the total size of all database tables.- Returns:
- the size of the database tables in bytes
- See Also:
-
getDBRows
public long getDBRows()Returns the total number of rows in all database tables.- Returns:
- the total number of rows in all tables
- See Also:
-
setTotalLegs
public void setTotalLegs(int legs) Updates the total number of legs flown.- Parameters:
legs- the number of legs- See Also:
-
setTotalMiles
public void setTotalMiles(long miles) Updates the total number of miles flown.- Parameters:
miles- the number of miles- See Also:
-
setTotalHours
public void setTotalHours(double hours) Updates the total number of hours flown.- Parameters:
hours- the number of hours- See Also:
-
setTotalPilots
public void setTotalPilots(int pilots) Updates the total number of pilots.- Parameters:
pilots- the number of pilots- See Also:
-
setActivePilots
public void setActivePilots(int pilots) Updates the total number of active pilots.- Parameters:
pilots- the number of actve pilots- See Also:
-
setACARSLegs
public void setACARSLegs(int legs) Updates the total number of legs flown with ACARS.- Parameters:
legs- the number of legs- See Also:
-
setACARSMiles
public void setACARSMiles(int miles) Updates the total number of miles flown with ACARS.- Parameters:
miles- the number of miles- See Also:
-
setACARSHours
public void setACARSHours(double hours) Updates the total number of hours flown with ACARS.- Parameters:
hours- the number of hours- See Also:
-
setOnlineLegs
public void setOnlineLegs(int legs) Updates the total number of legs flown online.- Parameters:
legs- the number of legs- See Also:
-
setOnlineMiles
public void setOnlineMiles(long miles) Updates the total number of miles flown online.- Parameters:
miles- the number of miles- See Also:
-
setOnlineHours
public void setOnlineHours(double hours) Updates the total number of hours flown online.- Parameters:
hours- the number of hours- See Also:
-
setMTDLegs
public void setMTDLegs(int legs) Updates the total number of legs flown since the start of the current Month.- Parameters:
legs- the number of legs- See Also:
-
setMTDHours
public void setMTDHours(double hours) Updates the total number of hours flown since the start of the current Month.- Parameters:
hours- the number of hours- See Also:
-
setMTDMiles
public void setMTDMiles(int miles) Updates the total number of miles flown since the start of the current Month.- Parameters:
miles- the number of miles- See Also:
-
setYTDLegs
public void setYTDLegs(int legs) Updates the total number of legs flown since the start of the current Yes.- Parameters:
legs- the number of legs- See Also:
-
setYTDHours
public void setYTDHours(double hours) Updates the total number of hours flown since the start of the current Year.- Parameters:
hours- the number of hours- See Also:
-
setYTDMiles
public void setYTDMiles(int miles) Updates the total number of miles flown since the start of the current Year.- Parameters:
miles- the number of miles- See Also:
-
setDBSize
public void setDBSize(long size) Updates the total size of all database tables.- Parameters:
size- the size of the tables in bytes- See Also:
-
setDBRows
public void setDBRows(long rows) Updates the total number of rows in all database tables.- Parameters:
rows- the number of rows in all tables- See Also:
-
compareTo
Compares the effective date/times.- Specified by:
compareToin interfaceComparable<AirlineTotals>
-
cacheKey
-