org.deltava.dao
Class GetFlightReportStatistics

java.lang.Object
  extended by org.deltava.dao.DAO
      extended by org.deltava.dao.GetFlightReportStatistics
All Implemented Interfaces:
CachingDAO

public class GetFlightReportStatistics
extends DAO
implements CachingDAO

A Data Access Object to retrieve Flight Report statistics.

Since:
2.1
Version:
3.1
Author:
Luke

Nested Class Summary
 class GetFlightReportStatistics.DispatchScheduleRoute
           
 
Field Summary
 
Fields inherited from class org.deltava.dao.DAO
_ps, _queryMax, _queryStart, _queryTimeout
 
Constructor Summary
GetFlightReportStatistics(Connection c)
          Initializes the Data Access Object.
 
Method Summary
 CacheInfo getCacheInfo()
          Returns cache statistics.
 Collection<FlightStatsEntry> getEQPIREPStatistics(String eqType, String groupBy, String orderBy, boolean descSort)
          Retrieves aggregated approved Flight Report statistics for Flights flown using aircraft that are Primary Ratings for a particular Equipment Type program.
 Map<Integer,Integer> getLandingCounts(int pilotID, int range)
          Returns the number of landings within a particular vertical speed range.
 Collection<LandingStatistics> getLandings(int pilotID)
          Returns statistical information about a pilot's landing speeds and variations between them.
 Collection<LandingStatistics> getLandings(String eqType, int minLandings)
          Returns statistical information about landing speeds and variations between them.
 Collection<FlightStatsEntry> getPIREPStatistics(int pilotID, String groupBy, String orderBy, boolean descSort, boolean activeOnly)
          Retrieves aggregated approved Flight Report statistics.
 Collection<ScheduleRoute> getPopularRoutes(boolean noRoutes, boolean allFlights)
          Returns the most popular route pairs filed by Pilots.
 Collection<FlightStatsEntry> getSimStatistics(String groupBy, String orderBy)
          Retrieves aggregated approved Flight Report statistics.
 void setDayFilter(int days)
          Sets the maximum number of days in the past to include.
 
Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeUpdate, expandDate, formatDBName, getNewID, getQueryCount, prepareStatement, prepareStatementWithoutLimits, rollbackTransaction, setManualCommit, setQueryMax, setQueryStart, setQueryTimeout, startTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetFlightReportStatistics

public GetFlightReportStatistics(Connection c)
Initializes the Data Access Object.

Parameters:
c - the JDBC connection to use
Method Detail

setDayFilter

public void setDayFilter(int days)
Sets the maximum number of days in the past to include.

Parameters:
days - the number of days
Since:
2.1

getCacheInfo

public CacheInfo getCacheInfo()
Returns cache statistics.

Specified by:
getCacheInfo in interface CachingDAO
Returns:
a CacheInfo bean

getPopularRoutes

public Collection<ScheduleRoute> getPopularRoutes(boolean noRoutes,
                                                  boolean allFlights)
                                           throws DAOException
Returns the most popular route pairs filed by Pilots.

Parameters:
noRoutes - TRUE to include pairs without dispatch routes only, otherwise FALSE
allFlights - TRUE to include Flight Reports without ACARS, otherwise FALSE
Returns:
a Collection of RoutePair beans
Throws:
DAOException - if a JDBC error occurs

getLandings

public Collection<LandingStatistics> getLandings(String eqType,
                                                 int minLandings)
                                          throws DAOException
Returns statistical information about landing speeds and variations between them.

Parameters:
eqType - the aircraft type
minLandings - the minimum number of landings to qualify
Returns:
a Collection of LandingStatistics beans
Throws:
DAOException - if a JDBC error occurs

getLandings

public Collection<LandingStatistics> getLandings(int pilotID)
                                          throws DAOException
Returns statistical information about a pilot's landing speeds and variations between them.

Parameters:
pilotID - the Pilot's database ID
Returns:
a Collection of LandingStatistics beans
Throws:
DAOException - if a JDBC error occurs

getLandingCounts

public Map<Integer,Integer> getLandingCounts(int pilotID,
                                             int range)
                                      throws DAOException
Returns the number of landings within a particular vertical speed range.

Parameters:
pilotID - the Pilot's database ID
range - the size of the vertical speed ranges
Returns:
a Map of landing counts keyed by vertical speed range
Throws:
DAOException - if a JDBC error occurs

getSimStatistics

public Collection<FlightStatsEntry> getSimStatistics(String groupBy,
                                                     String orderBy)
                                              throws DAOException
Retrieves aggregated approved Flight Report statistics.

Parameters:
groupBy - the "GROUP BY" column name
orderBy - the "ORDER BY" column name
Returns:
a Collection of FlightStatsEntry beans
Throws:
DAOException - if a JDBC error occurs

getEQPIREPStatistics

public Collection<FlightStatsEntry> getEQPIREPStatistics(String eqType,
                                                         String groupBy,
                                                         String orderBy,
                                                         boolean descSort)
                                                  throws DAOException
Retrieves aggregated approved Flight Report statistics for Flights flown using aircraft that are Primary Ratings for a particular Equipment Type program.

Parameters:
eqType - the Equipment type name
groupBy - the "GROUP BY" column name
orderBy - the "ORDER BY" column name
descSort - TRUE if a descending sort, otherwise FALSE
Returns:
a Collection of FlightStatsEntry beans
Throws:
DAOException - if a JDBC error occurs

getPIREPStatistics

public Collection<FlightStatsEntry> getPIREPStatistics(int pilotID,
                                                       String groupBy,
                                                       String orderBy,
                                                       boolean descSort,
                                                       boolean activeOnly)
                                                throws DAOException
Retrieves aggregated approved Flight Report statistics.

Parameters:
pilotID - the Pilot's database ID, or zero if airline-wide
groupBy - the "GROUP BY" column name
orderBy - the "ORDER BY" column name
descSort - TRUE if a descending sort, otherwise FALSE
activeOnly - TRUE if active pilots only, otherwise FALSE
Returns:
a Collection of FlightStatsEntry beans
Throws:
DAOException - if a JDBC error occurs


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