Class GetACARSRoute
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetACARSRoute
A Data Access Object to load stored ACARS dispatch routes.
- Since:
- 2.0
- 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 TypeMethodDescriptionLoads Airports from all saved routes in the database.getAll
(boolean activeOnly, boolean loadWP) Loads all saved routes from the database.Returns the database IDs of all dispatchers who have saved a Route.getByAuthor
(int authorID) Loads all saved routes from a particular Dispatcher.getRoute
(int id) Loads a saved route from the database.Loads all saved routes between two Airports.int
hasDuplicate
(RoutePair rp, String route) Searches for duplicate routes between two Airports.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
-
GetACARSRoute
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getRoute
Loads a saved route from the database.- Parameters:
id
- the route ID- Returns:
- a RoutePlan bean, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getAuthorIDs
Returns the database IDs of all dispatchers who have saved a Route.- Returns:
- a Collection of Database IDs
- Throws:
DAOException
- if a JDBC error occurs
-
getAll
Loads all saved routes from the database.- Parameters:
activeOnly
- TRUE if only active routes hould be loaded, otherwise FALSEloadWP
- TRUE if waypoints should be loaded, otherwise FALSE- Returns:
- a Collection of RoutePlan beans
- Throws:
DAOException
- if a JDBC error occurs
-
getAirports
Loads Airports from all saved routes in the database.- Returns:
- a Collection of Airport beans
- Throws:
DAOException
- if a JDBC error occurs
-
getByAuthor
Loads all saved routes from a particular Dispatcher.- Parameters:
authorID
- the Dispatcher database ID- Returns:
- a Collection of RoutePlan beans
- Throws:
DAOException
- if a JDBC error occurs
-
getRoutes
Loads all saved routes between two Airports.- Parameters:
rp
- the RoutePair - either airport can be nullactiveOnly
- TRUE if only active routes should be returned, otherwise FALSE- Returns:
- a Collection of RoutePlan beans
- Throws:
DAOException
- if a JDBC error occurs
-
hasDuplicate
Searches for duplicate routes between two Airports.- Parameters:
rp
- the RoutePairroute
- the route waypoints, separated by spaces- Returns:
- the route database ID, or zero if no duplicate found
- Throws:
DAOException
- if a JDBC error occurs
-