Class SetACARSPurge
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetACARSLog
org.deltava.dao.SetACARSPurge
A Data Access Object to purge ACARS data.
- Since:
- 3.2
- Version:
- 11.1
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
deletePositions
(int flightID) Deletes position entries for a flight.purgeFlights
(int hours, Collection<Integer> activeIDs) Deletes unfiled ACARS flight information older than a specified number of hours.int
purgeMessages
(int hours) Deletes ACARS text messages older than a specified number of hours.int
purgeTakeoffs
(int hours) Purges old ACARS takeoff and landing logs older than a specified number of hours.Methods inherited from class org.deltava.dao.SetACARSLog
deleteConnection, deleteError, deleteInfo, logError, purgeByUser, purgeError
Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeIDs, executeUpdate, executeUpdate, expandDate, formatDBName, formatLocation, getNewID, getQueryCount, prepare, prepareWithoutLimits, rollbackTransaction, setQueryMax, setQueryStart, setQueryTimeout, startTransaction, toID, toID, toInstant
-
Constructor Details
-
SetACARSPurge
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
purgeMessages
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 hoursactiveIDs
- a Collection of active Flight IDs- Returns:
- a Collection of purged Flight IDs
- Throws:
DAOException
- if a JDBC error occurs
-
purgeTakeoffs
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
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
-