Class GetPilotBoard

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

public class GetPilotBoard extends DAO
A Data Access Object to display pilot locations.
Since:
2.5
Version:
9.0
Author:
Luke
  • Constructor Details

    • GetPilotBoard

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

    • getLocation

      public GeoLocation getLocation(int pilotID) throws DAOException
      Returns the location of the specified Pilot.
      Parameters:
      pilotID - the Pilot's database ID
      Returns:
      a GeoLocation with the pilot's location, or null if none specified
      Throws:
      DAOException
    • getAll

      public Map<Integer, GeoLocation> getAll() throws DAOException
      Returns the locations of all Pilots who have signed up for the Pilot location board.
      Returns:
      a Map of GeoLocation objects, keyed by database ID
      Throws:
      DAOException - if a JDBC error occurs
    • getActive

      public Map<Integer, GeoLocation> getActive() throws DAOException
      Returns the locations of active/on leave Pilots who have signed up for the Pilot location board.
      Returns:
      a Map of GeoLocation objects, keyed by database ID
      Throws:
      DAOException - if a JDBC error occurs
    • getByID

      public Map<Integer, GeoLocation> getByID(Collection<Integer> ids) throws DAOException
      Returns the location of Pilots who have signed up for the Pilot location board.
      Parameters:
      ids - a Collection of Pilot database IDs
      Returns:
      a Map of GeoLocation objects, keyed by database ID
      Throws:
      DAOException - if a JDBC error occurs