Class GetFlightReportRecognition

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

public class GetFlightReportRecognition extends DAO
A Data Access Object to get Flight Report IDs for Pilot recognition.
Since:
1.0
Version:
10.4
Author:
Luke
  • Constructor Details

    • GetFlightReportRecognition

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

    • 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
    • getGreasedLandings

      public List<Integer> getGreasedLandings() throws DAOException
      Returns Flight Reports with the smoothest touchdown speed.
      Returns:
      a List of ACARSFlightReport database IDs
      Throws:
      DAOException - if a JDBC error occurs
    • getStaffReports

      public List<Integer> getStaffReports() throws DAOException
      Retrieves ACARS Flight Reports logged by staff members.
      Returns:
      a List of ACARSFlightReport database IDs
      Throws:
      DAOException - if a JDBC error occurs
    • getGreasedLandings

      public List<Integer> getGreasedLandings(String eqType) throws DAOException
      Retrieves ACARS Flight Reports for a particular equipment type.
      Parameters:
      eqType - the equipment type
      Returns:
      a List of ACARSFlightReport database IDs
      Throws:
      DAOException - if a JDBC error occurs
    • getACARSEquipmentTypes

      public List<String> getACARSEquipmentTypes(int minLegs) throws DAOException
      Returns all equipment types with ACARS Flight Reports.
      Parameters:
      minLegs - the minimum number of Flight Reports required for inclusion
      Returns:
      a List of equipment types
      Throws:
      DAOException - if a JDBC error occurs
    • getGreasedLandings

      public List<Integer> getGreasedLandings(int pilotID) throws DAOException
      Returns top Landings for a particular Pilot.
      Parameters:
      pilotID - the Pilots' database ID
      Returns:
      a List of LandingInfo beans, sorted by descending score
      Throws:
      DAOException - if a JDBC error occurs
    • getPromotionCount

      public int getPromotionCount(int pilotID, String eqType) throws DAOException
      Retrieves the number of legs a Pilot has completed that count towards promotion to Captain.
      Parameters:
      pilotID - the Pilot's database ID
      eqType - the equipment program name
      Returns:
      the number of completed legs
      Throws:
      DAOException - if a JDBC error occurs