Class ScheduleLoadDAO

java.lang.Object
org.deltava.dao.file.DAO
org.deltava.dao.file.ScheduleLoadDAO
Direct Known Subclasses:
GetDeltaSchedule, GetFullSchedule, GetPHPVMSSchedule, GetRawPDFSchedule, GetSchedule, GetSkyTeamSchedule

public abstract class ScheduleLoadDAO extends DAO
An abstract class to store common methods for Flight Schedule import Data Access Objects.
Since:
1.0
Version:
11.5
Author:
Luke
  • Field Details

  • Constructor Details

    • ScheduleLoadDAO

      protected ScheduleLoadDAO(ScheduleSource src, InputStream is)
      Initializes the Data Access Object.
      Parameters:
      src - the ScheduleSource
      is - the input stream to read
  • Method Details

    • setAircraft

      public void setAircraft(Collection<Aircraft> acInfo)
      Initializes the IATA/ICAO aircraft code mappings.
      Parameters:
      acInfo - a collection of Aircraft profile beans
    • setAirlines

      public void setAirlines(Collection<Airline> airlines)
      Initializes the list of airlines.
      Parameters:
      airlines - a Collection of Airline beans
      See Also:
    • process

      public abstract Collection<RawScheduleEntry> process() throws DAOException
      Returns back the loaded Flight Schedule entries.
      Returns:
      a Collection of ScheduleEntry beans
      Throws:
      DAOException - if a JDBC error occurs
    • getStatus

      public ImportStatus getStatus()
      Returns the schedule import results.
      Returns:
      an ImportStatus
    • getEquipmentType

      protected String getEquipmentType(String iataCode)
      Maps an IATA equipment code to an aircraft type.
      Parameters:
      iataCode - the IATA code
      Returns:
      the aircraft type, or null if not found
      Throws:
      NullPointerException - if iataCode is null
      See Also: