Class SetScheduleSync

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

public class SetScheduleSync extends DAO
A Data Access Object to synchronize flight schedules.
Since:
6.0
Version:
9.0
Author:
Luke
  • Constructor Details

    • SetScheduleSync

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

    • copy

      public int copy(Airline al, boolean canPurge, String srcDB) throws DAOException
      Copies all schedule entries for a particular airline into the current database.
      Parameters:
      al - the Airline
      canPurge - TRUE if the entries should be purged next import, otherwise FALSE
      srcDB - the source database name
      Returns:
      the number of entries copied
      Throws:
      DAOException - if a JDBC error occurs
    • purge

      public int purge(Airline al) throws DAOException
      Purges schedule entries from a particular airline from the current database. This will remove all entries whether they are purgeable or not.
      Parameters:
      al - the Airline
      Returns:
      the number of schedule entries deleted
      Throws:
      DAOException - if a JDBC error occurs