Class GetAircraft

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

public class GetAircraft extends DAO
A Data Access Object to load Aircraft data.
Since:
1.0
Version:
10.0
Author:
Luke
  • Constructor Details

    • GetAircraft

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

    • get

      public Aircraft get(String name) throws DAOException
      Loads a particular aircraft profile.
      Parameters:
      name - the aircraft name
      Returns:
      the Aircraft bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getIATA

      public Aircraft getIATA(String iataCode) throws DAOException
      Loads a particular aircraft by IATA code.
      Parameters:
      iataCode - the IATA code
      Returns:
      the Aircraft bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getAll

      public Collection<Aircraft> getAll() throws DAOException
      Returns all aircraft profiles.
      Returns:
      a Collection of Aircraft beans
      Throws:
      DAOException - if a JDBC error occurs
    • getAircraftTypes

      public Collection<Aircraft> getAircraftTypes() throws DAOException
      Returns all aircraft used by the current web application.
      Returns:
      a Collection of Aircraft beans
      Throws:
      DAOException - if a JDBC error occurs
    • getAircraftTypes

      public Collection<Aircraft> getAircraftTypes(String airlineCode) throws DAOException
      Returns all aircraft used by a web application.
      Parameters:
      airlineCode - the Airline code
      Returns:
      a Collection of Aircraft beans
      Throws:
      DAOException - if a JDBC error occurs
    • getAircraftTypes

      public Collection<Aircraft> getAircraftTypes(int pilotID) throws DAOException
      Returns aircraft used by a particular pilot.
      Parameters:
      pilotID - the Pilot database ID
      Returns:
      a Collection of Aircraft beans
      Throws:
      DAOException - if a JDBC error occurs