Class GetWeather
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetWeather
A Data Access Object to load weather data from the database.
- Since:
- 2.7
- 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 TypeMethodDescriptionget
(WeatherDataBean.Type t, String code) Retrieves an arbitrary weather data object from the database.getILSAirports
(ILSCategory ilscat) Returns Airports with ILS conditions.Retrieves the METAR for a particular observation station.getMETAR
(GeoLocation loc, int distance) Returns the closest METAR to a given point within a specific radius.Retrieves the METAR for a particular Airport.Retrieves the TAF for a particular observation station.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
-
GetWeather
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
get
Retrieves an arbitrary weather data object from the database.- Parameters:
t
- the WeatherDataBean Typecode
- the observation station code- Returns:
- a WeatherDataBean, or null if none found
- Throws:
DAOException
- if a JDBC error occurs
-
getMETAR
Retrieves the METAR for a particular Airport.- Parameters:
a
- the ICAOAirport- Returns:
- a METAR object, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getMETAR
Returns the closest METAR to a given point within a specific radius.- Parameters:
loc
- the GeoLocationdistance
- the maximum distance in miles- Returns:
- a METAR or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getMETAR
Retrieves the METAR for a particular observation station.- Parameters:
code
- the observation station code- Returns:
- a METAR object, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getTAF
Retrieves the TAF for a particular observation station.- Parameters:
code
- the observation station code- Returns:
- a TAF object, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getILSAirports
Returns Airports with ILS conditions.- Parameters:
ilscat
- the ILSCategory- Returns:
- a Collection of Airport beans
- Throws:
DAOException
- if a JDBC error occurs
-