Class SetWeather
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetWeather
A Data Access Object to save weather data in the database.
- Since:
- 2.7
- Version:
- 11.4
- 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
purgeMETAR
(int age) Purges METAR data older than a particular age.int
purgeTAF
(int age) Purges TAF data older than a particular age.void
writeMETAR
(Collection<METAR> data) Writes METAR beans to the database.void
writeTAF
(Collection<TAF> data) Writes TAF beans 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
-
SetWeather
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
writeMETAR
Writes METAR beans to the database.- Parameters:
data
- a Collection of METARs- Throws:
DAOException
- if a JDBC error occurs
-
writeTAF
Writes TAF beans to the database.- Parameters:
data
- a Collection of TAFs- Throws:
DAOException
- if a JDBC error occurs
-
purgeMETAR
Purges METAR data older than a particular age.- Parameters:
age
- the age in minutes- Returns:
- the number of purged entries
- Throws:
DAOException
- if a JDBC error occurs
-
purgeTAF
Purges TAF data older than a particular age.- Parameters:
age
- the age in minutes- Returns:
- the number of purged entries
- Throws:
DAOException
- if a JDBC error occurs
-