Class SetCachedRoutes
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetCachedRoutes
A Data Access Object to saved cached flight routes to the database.
- Since:
- 2.6
- Version:
- 9.0
- 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
purge
(int days) Purges routes older than a certain date.void
Purges all saved routes between two airports from the database.void
write
(Collection<? extends FlightRoute> routes) Writes a number of Flight routes to the database.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
-
SetCachedRoutes
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
write
Writes a number of Flight routes to the database.- Parameters:
routes
-- Throws:
DAOException
-
purge
Purges all saved routes between two airports from the database.- Parameters:
rp
- the RoutePair- Throws:
DAOException
- if a JDBC error occurs
-
purge
Purges routes older than a certain date.- Parameters:
days
- the number of days old to purge- Returns:
- the number of routes purged
- Throws:
DAOException
- if a JDBC error occurs
-