org.deltava.beans.stats
Class AirlineTotals

java.lang.Object
  extended by org.deltava.beans.stats.AirlineTotals
All Implemented Interfaces:
Comparable<AirlineTotals>, Cacheable

public class AirlineTotals
extends Object
implements Comparable<AirlineTotals>, Cacheable

A bean to store Airline-wide statistics.

Since:
1.0
Version:
2.6
Author:
Luke

Field Summary
static Calendar BIRTHDATE
          Date the airline statistics commenced.
 
Constructor Summary
AirlineTotals(long ed)
          Initializes the bean with an effective date.
 
Method Summary
 Object cacheKey()
          Returns the cache key for this object.
 int compareTo(AirlineTotals at2)
          Compares the effective date/times.
 double getACARSHours()
          Returns the total number of hours flown with ACARS.
 int getACARSLegs()
          Returns the number of legs flown with ACARS.
 int getACARSMiles()
          Returns the total number of miles flown with ACARS.
 int getActivePilots()
          Returns the number of active pilots.
 int getAge()
          Helper method to calculate the age of the airline.
 long getDBRows()
          Returns the total number of rows in all database tables.
 long getDBSize()
          Returns the total size of all database tables.
 long getEffectiveDate()
          Returns the effective date of these statistics.
 double getMTDHours()
          Returns the number of hours flown since the start of the current Month.
 int getMTDLegs()
          Returns the number of legs flown since the start of the current Month.
 int getMTDMiles()
          Returns the number of miles flown since the start of the current Month.
 double getOnlineHours()
          Returns the total number of hours flown online.
 int getOnlineLegs()
          Returns the number of legs flown online.
 long getOnlineMiles()
          Returns the total number of miles flown online.
 double getTotalHours()
          Returns the total number of hours flown.
 int getTotalLegs()
          Returns the total number of legs flown.
 long getTotalMiles()
          Returns the total number of miles flown.
 int getTotalPilots()
          Returns the total number of pilots.
 double getYTDHours()
          Returns the number of hours flown since the start of the current Year.
 int getYTDLegs()
          Returns the number of legs flown since the start of the current Year.
 int getYTDMiles()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIRTHDATE

public static final Calendar BIRTHDATE
Date the airline statistics commenced.

Constructor Detail

AirlineTotals

public AirlineTotals(long ed)
Initializes the bean with an effective date.

Parameters:
ed - the effective date/time of the statistics as a 32-bit UNIX timestamp
See Also:
getEffectiveDate()
Method Detail

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

public long getEffectiveDate()
Returns the effective date of these statistics.

Returns:
the date/time the statistics were generated as a 32-bit UNIX timestamp

getTotalLegs

public int getTotalLegs()
Returns the total number of legs flown.

Returns:
the number of legs
See Also:
setTotalLegs(int)

getTotalMiles

public long getTotalMiles()
Returns the total number of miles flown.

Returns:
the number of miles
See Also:
setTotalMiles(long)

getTotalHours

public double getTotalHours()
Returns the total number of hours flown.

Returns:
the number of hours
See Also:
setTotalHours(double)

getTotalPilots

public int getTotalPilots()
Returns the total number of pilots.

Returns:
the number of pilots
See Also:
setTotalPilots(int)

getActivePilots

public int getActivePilots()
Returns the number of active pilots.

Returns:
the number of active pilots
See Also:
setActivePilots(int)

getOnlineLegs

public int getOnlineLegs()
Returns the number of legs flown online.

Returns:
the number of legs
See Also:
setOnlineLegs(int)

getOnlineHours

public double getOnlineHours()
Returns the total number of hours flown online.

Returns:
the number of hours
See Also:
setOnlineHours(double)

getOnlineMiles

public long getOnlineMiles()
Returns the total number of miles flown online.

Returns:
the number of miles
See Also:
setOnlineMiles(long)

getACARSLegs

public int getACARSLegs()
Returns the number of legs flown with ACARS.

Returns:
the number of legs
See Also:
setACARSLegs(int)

getACARSHours

public double getACARSHours()
Returns the total number of hours flown with ACARS.

Returns:
the number of hours
See Also:
setACARSHours(double)

getACARSMiles

public int getACARSMiles()
Returns the total number of miles flown with ACARS.

Returns:
the number of miles
See Also:
setACARSMiles(int)

getMTDLegs

public int getMTDLegs()
Returns the number of legs flown since the start of the current Month.

Returns:
the number of legs
See Also:
setMTDLegs(int)

getMTDHours

public double getMTDHours()
Returns the number of hours flown since the start of the current Month.

Returns:
the number of hours
See Also:
setMTDHours(double)

getMTDMiles

public int getMTDMiles()
Returns the number of miles flown since the start of the current Month.

Returns:
the number of miles
See Also:
setMTDMiles(int)

getYTDLegs

public int getYTDLegs()
Returns the number of legs flown since the start of the current Year.

Returns:
the number of legs
See Also:
setYTDLegs(int)

getYTDHours

public double getYTDHours()
Returns the number of hours flown since the start of the current Year.

Returns:
the number of hours
See Also:
setYTDHours(double)

getYTDMiles

public int getYTDMiles()
Returns the number of miles flown since the start of the current Year.

Returns:
the number of miles
See Also:
setYTDMiles(int)

getDBSize

public long getDBSize()
Returns the total size of all database tables.

Returns:
the size of the database tables in bytes
See Also:
setDBSize(long)

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:
setDBRows(long)

setTotalLegs

public void setTotalLegs(int legs)
Updates the total number of legs flown.

Parameters:
legs - the number of legs
See Also:
getTotalLegs()

setTotalMiles

public void setTotalMiles(long miles)
Updates the total number of miles flown.

Parameters:
miles - the number of miles
See Also:
getTotalMiles()

setTotalHours

public void setTotalHours(double hours)
Updates the total number of hours flown.

Parameters:
hours - the number of hours
See Also:
getTotalHours()

setTotalPilots

public void setTotalPilots(int pilots)
Updates the total number of pilots.

Parameters:
pilots - the number of pilots
See Also:
getTotalPilots()

setActivePilots

public void setActivePilots(int pilots)
Updates the total number of active pilots.

Parameters:
pilots - the number of actve pilots
See Also:
getActivePilots()

setACARSLegs

public void setACARSLegs(int legs)
Updates the total number of legs flown with ACARS.

Parameters:
legs - the number of legs
See Also:
getACARSLegs()

setACARSMiles

public void setACARSMiles(int miles)
Updates the total number of miles flown with ACARS.

Parameters:
miles - the number of miles
See Also:
getACARSMiles()

setACARSHours

public void setACARSHours(double hours)
Updates the total number of hours flown with ACARS.

Parameters:
hours - the number of hours
See Also:
getACARSHours()

setOnlineLegs

public void setOnlineLegs(int legs)
Updates the total number of legs flown online.

Parameters:
legs - the number of legs
See Also:
getOnlineLegs()

setOnlineMiles

public void setOnlineMiles(long miles)
Updates the total number of miles flown online.

Parameters:
miles - the number of miles
See Also:
getOnlineMiles()

setOnlineHours

public void setOnlineHours(double hours)
Updates the total number of hours flown online.

Parameters:
hours - the number of hours
See Also:
getOnlineHours()

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:
getMTDLegs()

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:
getMTDHours()

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:
getMTDMiles()

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:
getYTDLegs()

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:
getYTDHours()

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:
getYTDMiles()

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:
getDBSize()

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:
getDBRows()

compareTo

public int compareTo(AirlineTotals at2)
Compares the effective date/times.

Specified by:
compareTo in interface Comparable<AirlineTotals>

cacheKey

public Object cacheKey()
Returns the cache key for this object.

Specified by:
cacheKey in interface Cacheable
Returns:
the class object


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.