org.deltava.dao
Class GetWeather

java.lang.Object
  extended by org.deltava.dao.DAO
      extended by org.deltava.dao.WeatherDAO
          extended by org.deltava.dao.GetWeather
All Implemented Interfaces:
CachingDAO

public class GetWeather
extends WeatherDAO

A Data Access Object to load weather data from the database.

Since:
2.7
Version:
2.7
Author:
Luke

Field Summary
 
Fields inherited from class org.deltava.dao.WeatherDAO
_tafCache, _wxCache
 
Fields inherited from class org.deltava.dao.DAO
_ps, _queryMax, _queryStart, _queryTimeout
 
Constructor Summary
GetWeather(Connection c)
          Initializes the Data Access Object.
 
Method Summary
 WeatherDataBean get(WeatherDataBean.Type t, String code)
          Retrieves an arbitrary weather data object from the database.
 METAR getMETAR(String code)
          Retrieves the METAR for a particular observation station.
 TAF getTAF(String code)
          Retrieves the TAF for a particular observation station.
 
Methods inherited from class org.deltava.dao.WeatherDAO
getCacheInfo
 
Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeUpdate, expandDate, formatDBName, getNewID, getQueryCount, prepareStatement, prepareStatementWithoutLimits, rollbackTransaction, setManualCommit, setQueryMax, setQueryStart, setQueryTimeout, startTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetWeather

public GetWeather(Connection c)
Initializes the Data Access Object.

Parameters:
c - the JDBC connection to use
Method Detail

get

public WeatherDataBean get(WeatherDataBean.Type t,
                           String code)
                    throws DAOException
Retrieves an arbitrary weather data object from the database.

Parameters:
t - the WeatherDataBean Type
code - the observation station code
Returns:
a WeatherDataBean, or null if none found
Throws:
DAOException - if a JDBC error occurs

getMETAR

public METAR getMETAR(String code)
               throws DAOException
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

public TAF getTAF(String code)
           throws DAOException
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


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.