Class SetSchedule

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

public class SetSchedule extends DAO
A Data Access Object to update the Flight Schedule.
Since:
1.0
Version:
11.2
Author:
Luke
  • Constructor Details

    • SetSchedule

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

    • write

      public void write(ScheduleEntry entry, boolean doReplace) throws DAOException
      Adds an entry to the Flight Schedule.
      Parameters:
      entry - the Schedule Entry
      doReplace - TRUE if an existing entry can be replaced, otherwise FALSE
      Throws:
      DAOException - if a JDBC error occurs
    • writeRaw

      public void writeRaw(RawScheduleEntry rse, boolean doReplace) throws DAOException
      Writes a raw Schedule Entry from a schedule provider into the storage database.
      Parameters:
      rse - a RawScheduleEntry
      doReplace - TRUE if an existing entry can be replaced, otherwise FALSE
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(RawScheduleEntry entry) throws DAOException
      Deletes an entry from the Flight Schedule.
      Parameters:
      entry - the entry
      Throws:
      DAOException - if a JDBC error occurs
      NullPointerException - if entry is null
    • purge

      public int purge(ScheduleSource src) throws DAOException
      Purges entries from the Flight Schedule.
      Parameters:
      src - a ScheduleSource, or null for all
      Returns:
      the number of deleted entries
      Throws:
      DAOException - if a JDBC error occurs
    • writeSourceAirlines

      public void writeSourceAirlines(ScheduleSourceHistory src) throws DAOException
      Updates the mapping of Raw Schedules sources to Airlines.
      Parameters:
      src - a ScheduleSourceInfo bean
      Throws:
      DAOException - if a JDBC error occurs
    • purgeSourceAirlines

      public void purgeSourceAirlines(ScheduleSource src) throws DAOException
      Purges Raw Schedule source / airline mappings.
      Parameters:
      src - a ScheduleSource, or null for all
      Throws:
      DAOException - if a JDBC error occurs
    • purgeRaw

      public int purgeRaw(ScheduleSource src) throws DAOException
      Purges entries from the raw Flight Schedule.
      Parameters:
      src - the ScheduleSource
      Returns:
      the number of entries deleted
      Throws:
      DAOException - if a JDBC error occurs