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.int
compareTo
(AirlineTotals at2) Compares the effective date/times.double
Returns the total number of hours flown with ACARS.int
Returns the number of legs flown with ACARS.int
Returns the total number of miles flown with ACARS.int
Returns the number of active pilots.int
getAge()
Helper method to calculate the age of the airline.long
Returns the total number of rows in all database tables.long
Returns the total size of all database tables.Returns the effective date of these statistics.double
Returns the number of hours flown since the start of the current Month.int
Returns the number of legs flown since the start of the current Month.int
Returns the number of miles flown since the start of the current Month.double
Returns the total number of hours flown online.int
Returns the number of legs flown online.long
Returns the total number of miles flown online.double
Returns the total number of hours flown.int
Returns the total number of legs flown.long
Returns the total number of miles flown.int
Returns the total number of pilots.double
Returns the number of hours flown since the start of the current Year.int
Returns the number of legs flown since the start of the current Year.int
Returns the number of miles flown since the start of the current Year.void
setACARSHours
(double hours) Updates the total number of hours flown with ACARS.void
setACARSLegs
(int legs) Updates the total number of legs flown with ACARS.void
setACARSMiles
(int miles) Updates the total number of miles flown with ACARS.void
setActivePilots
(int pilots) Updates the total number of active pilots.void
setDBRows
(long rows) Updates the total number of rows in all database tables.void
setDBSize
(long size) Updates the total size of all database tables.void
setMTDHours
(double hours) Updates the total number of hours flown since the start of the current Month.void
setMTDLegs
(int legs) Updates the total number of legs flown since the start of the current Month.void
setMTDMiles
(int miles) Updates the total number of miles flown since the start of the current Month.void
setOnlineHours
(double hours) Updates the total number of hours flown online.void
setOnlineLegs
(int legs) Updates the total number of legs flown online.void
setOnlineMiles
(long miles) Updates the total number of miles flown online.void
setTotalHours
(double hours) Updates the total number of hours flown.void
setTotalLegs
(int legs) Updates the total number of legs flown.void
setTotalMiles
(long miles) Updates the total number of miles flown.void
setTotalPilots
(int pilots) Updates the total number of pilots.void
setYTDHours
(double hours) Updates the total number of hours flown since the start of the current Year.void
setYTDLegs
(int legs) Updates the total number of legs flown since the start of the current Yes.void
setYTDMiles
(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:
compareTo
in interfaceComparable<AirlineTotals>
-
cacheKey
-