Class GetScheduleAirport

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

public class GetScheduleAirport extends DAO
A Data Access Object to load Schedule route data.
Since:
1.0
Version:
9.0
Author:
Luke
  • Constructor Details

    • GetScheduleAirport

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

    • getOriginAirports

      public List<Airport> getOriginAirports(Airline al) throws DAOException
      Returns all Airports for an Airline with at least one flight departing.
      Parameters:
      al - the Airline bean or null
      Returns:
      a Collection of Airport beans, sorted by airport name
      Throws:
      DAOException - if a JDBC error occurs
    • getDestinationAirports

      public List<Airport> getDestinationAirports(Airline al) throws DAOException
      Returns all Airports for an Airline with at least one flight arriving.
      Parameters:
      al - the Airline bean or null
      Returns:
      a Collection of Airport beans, sorted by airport name
      Throws:
      DAOException - if a JDBC error occurs
    • getDepartureStatistics

      public Collection<ScheduleStatsEntry> getDepartureStatistics(Airport a) throws DAOException
      Returns departing flight statistics for a particular Airport.
      Parameters:
      a - the Airport
      Returns:
      a Collection of ScheduleStatsEntry beans
      Throws:
      DAOException - if a JDBC error occurs
    • getArrivalStatistics

      public Collection<ScheduleStatsEntry> getArrivalStatistics(Airport a) throws DAOException
      Returns arriving flight statistics for a particular Airport.
      Parameters:
      a - the Airport
      Returns:
      a Collection of ScheduleStatsEntry beans
      Throws:
      DAOException - if a JDBC error occurs
    • getConnectingAirports

      public List<Airport> getConnectingAirports(Airport a, boolean from, Airline al) throws DAOException
      Returns Airports with flights departing or arriving at a particular Airport for a particular Airline.
      Parameters:
      a - the Airport bean
      from - TRUE if returning destination airports for flights originating at a, otherwise FALSE
      al - the Airline bean
      Returns:
      a Collection of Airport beans
      Throws:
      DAOException - if a JDBC error occurs