Class GetPilotRecognition


public class GetPilotRecognition extends GetPilot
A Data Acccess Object to read Pilots that have achieved certain accomplishments.
Since:
1.0
Version:
9.1
Author:
Luke
  • Constructor Details

    • GetPilotRecognition

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

    • invalidate

      public static void invalidate(String eqType)
      Invalidates the Promotion Queue caches.
      Parameters:
      eqType - the equipment type, or null to invalidate all
    • getByAccomplishment

      public Collection<Pilot> getByAccomplishment(int id) throws DAOException
      Loads all pilots having achieved a particular Accomplishment.
      Parameters:
      id - the Accomplishment database ID
      Returns:
      a Collection of Pilots
      Throws:
      DAOException - if a JDBC error occurs
    • hasPromotionQueue

      public int hasPromotionQueue(String eqType) throws DAOException
      Returns whether there are Pilots eligible for promotion to Captain in a particular Equipment program.
      Parameters:
      eqType - the equipment program, or null for all
      Returns:
      the number of pilots
      Throws:
      DAOException - if a JDBC error occurs
    • getPromotionQueue

      public Collection<Integer> getPromotionQueue(String eqType) throws DAOException
      Returns Pilots eligible for promotion to Captain.
      Parameters:
      eqType - the Equipment program, or null for all programs
      Returns:
      a List of Pilot IDs
      Throws:
      DAOException - if a JDBC error occurs
    • getNominationEligible

      public Collection<Integer> getNominationEligible() throws DAOException
      Returns Pilots eligible for promotion to Senior Captain.
      Returns:
      a Collection of database IDs
      Throws:
      DAOException - if a JDBC error occurs