Class GetNavAirway
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetNavData
org.deltava.dao.GetNavAirway
- Direct Known Subclasses:
GetOceanicRoute
A Data Access Object to load navigation route and airway data.
- Since:
- 1.0
- Version:
- 11.3
- Author:
- Luke
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Cache<CacheableList<Airway>> Airway cache.Fields inherited from class DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRIDModifier and TypeFieldDescriptionprotected intThe maximum number of rows to return.protected intThe row number at which to start returning results.protected intThe query timeout, in seconds.protected static final intThe SRID used for geolocation queries. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAirways(String name) Loads a Airway definitions from the database.getAll()Returns all SIDs/STARs in the database.getBestRoute(ICAOAirport a, TerminalRoute.Type t, String name, String wp, String rwy) Returns the most likely Terminal Route used based on the Airport, Name, last waypoint and runway.getBestRoute(ICAOAirport a, TerminalRoute.Type t, String name, String wp, Runway rwy) Returns the most likely Terminal Route used based on the Airport, Name, last waypoint and runway.Loads a SID/STAR from the navigation database.getRoute(ICAOAirport a, TerminalRoute.Type t, String name) Retrieves a specifc SID/STAR.getRoute(ICAOAirport a, TerminalRoute.Type t, String name, boolean ignoreVersion) Retrieves a specifc SID/STAR.Returns all SIDs/STARs in the database.Loads all SIDs/STARs for a particular Airport.Returns the available SID runways for a particular Airport.Methods inherited from class GetNavData
get, getAirport, getAll, getBearingRange, getBestRunway, getByID, getIntersections, getObjects, getRunway, getRunways, getRunways, getRunwaysModifier and TypeMethodDescriptionReturns a Navigation object.getAirport(String code) Returns an Airport location from the database.Returns all navaids of a particular type in the database.getBearingRange(String code) Retrieves "special" navaids such as CODE[bearing][distance].getBestRunway(ICAOAirport a, Simulator sim, GeoLocation loc, int hdg) Returns the likeliest runway for a takeoff or landing.getByID(Collection<String> ids) Returns a group of Navigation objects.getIntersections(GeoLocation loc, int distance) Returns all Intersections within a set number of miles from a point.getObjects(GeoLocation loc, int distance) Returns all Navigation objects (except Intersections/Runways/Gates) within a set number of miles from a point.getRunway(ICAOAirport a, String rwyCode, Simulator sim) Returns information about a particular airport Runway.Returns all Runways in the database.Returns information about all airport Runways in all Simulators.getRunways(ICAOAirport a, Simulator sim) Returns all Runways for a particular Airport.Methods inherited from class DAO
commitTransaction, createTimestamp, executeIDs, executeUpdate, executeUpdate, expandDate, formatDBName, formatLocation, getNewID, getQueryCount, prepare, prepareWithoutLimits, rollbackTransaction, setQueryMax, setQueryStart, setQueryTimeout, startTransaction, toID, toID, toInstantModifier and TypeMethodDescriptionprotected voidCommits a multi-step transaction to the database.protected static TimestampNull-safe conversion of an Instant to a Timestamp.Helper method to extract database ID data from the result set.protected static intexecuteUpdate(PreparedStatement ps, int minUpdateCount) Executes an UPDATE transaction on a prepared statement, and throws aSQLExceptionif less than the expected number of rows were updated.protected static intexecuteUpdate(PreparedStatement ps, int minPerUpdate, int minTotal) Executes an batched UPDATE transaction on a prepared statement, and throws aSQLExceptionif less than the expected number of rows were updated per batch entry.protected static InstantexpandDate(Date dt) Converts a date-only JDBC value into a full timestamp.protected static StringformatDBName(String db) Formats a database name by converting to lowercase.protected static StringConverts a geographic location into a MySQL WKT formatted point.protected intgetNewID()Returns the AUTO_INC column value generated by the previous JDBC transaction.static final longReturns the total number of queries executed since the JVM was started.protected PreparedStatementInitialize the prepared statement with an arbitrary SQL statement.protected PreparedStatementInitialize the prepared statement with an abitrary SQL statement, without applying the DAO's query result limitations.protected voidRolls back a multi-step transaction before it is completed.final voidsetQueryMax(int maxRows) Sets the maximum number of rows in the returned result set.final voidsetQueryStart(int rowStart) Sets the first row of the results to return.voidsetQueryTimeout(int timeout) Sets the timeout for any SQL operations.protected voidMarks the start of a multi-step database transaction.protected static IntegerConverts a Database bean or an Integer into an Integer.protected static Collection<Integer> toID(Collection<?> ids) Converts a collection of Objects into Integer IDs.protected static InstantNull-safe conversion of a Timestamp to an Instant.
-
Field Details
-
_aCache
Airway cache.
-
-
Constructor Details
-
GetNavAirway
Initializes the Data Access Object.- Parameters:
c- the JDBC connection to use
-
-
Method Details
-
getRoute
Loads a SID/STAR from the navigation database.- Parameters:
name- the name of the Terminal Route, as NAME.TRANSITION- Returns:
- a TerminalRoute bean, or null if not found
- Throws:
DAOException- if a JDBC error occurs
-
getRouteNames
Returns all SIDs/STARs in the database. This does not populate waypoint data.- Returns:
- a Collection of TerminalRoute beans
- Throws:
DAOException- if a JDBC error occurs
-
getSIDRunways
Returns the available SID runways for a particular Airport.- Parameters:
a- an ICAOAirport- Returns:
- a Collection of Runway codes
- Throws:
DAOException- if a JDBC error occurs
-
getAll
Returns all SIDs/STARs in the database.- Returns:
- a Collection of TerminalRoute beans
- Throws:
DAOException- if a JDBC error occurs
-
getAirways
Loads a Airway definitions from the database.- Parameters:
name- the airway code- Returns:
- a Collection of Airway beans
- Throws:
DAOException- if a JDBC error occurs
-