Class GetACARSOnTime

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetACARSOnTime

public class GetACARSOnTime extends DAO
A Data Access Object to load ACARS on-time data from the database.
Since:
8.4
Version:
10.3
Author:
Luke
  • Constructor Details

    • GetACARSOnTime

      public GetACARSOnTime(Connection c)
      Initializes the Data Access Object.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • getOnTime

      public ScheduleEntry getOnTime(ACARSFlightReport afr) throws DAOException
      Loads on-time data. The flight report will have its departure and arrival times set.
      Parameters:
      afr - the ACARSFlightReport
      Returns:
      a ScheduleEntry, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getOnTimeStatistics

      public Map<OnTime,Integer> getOnTimeStatistics(int pilotID) throws DAOException
      Retrieves aggregated on-time performance values for a Pilot.
      Parameters:
      pilotID - the Pilot's database ID, or zero for the entire airline
      Returns:
      a Map of Flight counts, keyed by OnTime values
      Throws:
      DAOException - if a JDBC error occurs
    • getByDate

      public Collection<OnTimeStatsEntry> getByDate(int maxDays) throws DAOException
      Retrieves airline-wide on-time flight statistics.
      Parameters:
      maxDays - the maximum number of days in the past to retrieve
      Returns:
      a Collection of OnTimeStatsEntry beans
      Throws:
      DAOException - if a JDBC error occurs
    • getOnTimeStatistics

      public OnTimeStatsEntry getOnTimeStatistics(RoutePair rp, String db) throws DAOException
      Returns on-time flight statistics for a particular flight route.
      Parameters:
      rp - the RoutePair
      db - the database name
      Returns:
      an OnlineStatsEntry bean
      Throws:
      DAOException - if a JDBC error occurs