Class SetAirportAirline

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

public class SetAirportAirline extends DAO
A Data Access Object to update Airport and Airline information.
Since:
8.0
Version:
11.2
Author:
Luke
  • Constructor Details

    • SetAirportAirline

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

    • create

      public void create(Airline al) throws DAOException
      Writes a new Airline to the Schedule.
      Parameters:
      al - the Airline bean
      Throws:
      DAOException - if a JDBC error occurs
    • update

      public void update(Airline al, String oldCode) throws DAOException
      Updates an existing Airline in the Schedule.
      Parameters:
      al - the Airline bean
      oldCode - the old airline code
      Throws:
      DAOException - if a JDBC error occurs
    • create

      public void create(Airport a) throws DAOException
      Writes a new Airport to the Schedule.
      Parameters:
      a - the Airport bean
      Throws:
      DAOException - if a JDBC error occurs
    • update

      public void update(Airport a, String oldCode) throws DAOException
      Updates an existing Airport in the Schedule.
      Parameters:
      a - the Airport bean
      oldCode - the old IATA code, or null if no change
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(Airport a) throws DAOException
      Deletes an Airport from the Schedule. This operation may fail if there are any Flight Reports or Events that reference this Airport. In such a case, it is best to remove all Airlines from the Airport.
      Parameters:
      a - the Airport bean
      Throws:
      DAOException - if a JDBC error occurs
      NullPointerException - if a is null
    • delete

      public void delete(Airline a) throws DAOException
      Deletes an Airline from the Schedule. This operation may fail if there are any Flight Reports that reference this Airline. In such a case, it is best to disable the Airline.
      Parameters:
      a - the Airline bean
      Throws:
      DAOException - if a JDBC error occurs
      NullPointerException - if a is null
    • create

      public void create(Aircraft a) throws DAOException
      Creates a new aircraft profile.
      Parameters:
      a - the Aircraft bean
      Throws:
      DAOException - if a JDBC error occurs
    • update

      public void update(Aircraft a, String oldName) throws DAOException
      Updates the aircraft profile.
      Parameters:
      a - the Aircraft bean
      oldName - the old aircraft name
      Throws:
      DAOException - if a JDBC error occurs
    • remapAirportAirlines

      public void remapAirportAirlines() throws DAOException
      Regenerates the mapping of airports to airlines.
      Throws:
      DAOException - if a JDBC error occurs