Class GetAirline

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

public class GetAirline extends DAO
A Data Access Object to load Airline codes and names.
Since:
1.0
Version:
11.2
Author:
Luke
  • Constructor Details

    • GetAirline

      public GetAirline(Connection c)
      Creates the DAO with a JDBC connection.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • getAll

      public Map<String,Airline> getAll() throws DAOException
      Returns all Airlines from the database.
      Returns:
      a Map of Airline objects, with the code as the key
      Throws:
      DAOException - if a JDBC error occurs
    • getActive

      public Map<String,Airline> getActive() throws DAOException
      Returns all active Airlines from the database.
      Returns:
      a Map of Airline objects where isActive() == TRUE with the code as the key
      Throws:
      DAOException - if a JDBC error occurs
    • get

      public Airline get(String code) throws DAOException
      Returns an Airline object.
      Parameters:
      code - the Airline code to get
      Returns:
      the Airline, or null if the code was not found
      Throws:
      DAOException - if a JDBC error occurs
      NullPointerException - if code is null