Class SetACARSPurge


public class SetACARSPurge extends SetACARSLog
A Data Access Object to purge ACARS data.
Since:
3.2
Version:
11.1
Author:
Luke
  • Constructor Details

    • SetACARSPurge

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

    • purgeMessages

      public int purgeMessages(int hours) throws DAOException
      Deletes ACARS text messages older than a specified number of hours.
      Parameters:
      hours - the number of hours
      Returns:
      the number of messages purged
      Throws:
      DAOException - if a JDBC error occurs
    • purgeFlights

      public Collection<Integer> purgeFlights(int hours, Collection<Integer> activeIDs) throws DAOException
      Deletes unfiled ACARS flight information older than a specified number of hours.
      Parameters:
      hours - the number of hours
      activeIDs - a Collection of active Flight IDs
      Returns:
      a Collection of purged Flight IDs
      Throws:
      DAOException - if a JDBC error occurs
    • purgeTakeoffs

      public int purgeTakeoffs(int hours) throws DAOException
      Purges old ACARS takeoff and landing logs older than a specified number of hours.
      Parameters:
      hours - the number of hours
      Returns:
      the number of entries purged
      Throws:
      DAOException - if a JDBC error occurs
    • deletePositions

      public int deletePositions(int flightID) throws DAOException
      Deletes position entries for a flight.
      Parameters:
      flightID - the flight database ID
      Returns:
      the number of entries deleted
      Throws:
      DAOException - if a JDBC error occurs