Class SetWeather

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetWeather

public class SetWeather extends DAO
A Data Access Object to save weather data in the database.
Since:
2.7
Version:
11.4
Author:
Luke
  • Constructor Details

    • SetWeather

      public SetWeather(Connection c)
      Initializes the Data Access Object.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • writeMETAR

      public void writeMETAR(Collection<METAR> data) throws DAOException
      Writes METAR beans to the database.
      Parameters:
      data - a Collection of METARs
      Throws:
      DAOException - if a JDBC error occurs
    • writeTAF

      public void writeTAF(Collection<TAF> data) throws DAOException
      Writes TAF beans to the database.
      Parameters:
      data - a Collection of TAFs
      Throws:
      DAOException - if a JDBC error occurs
    • purgeMETAR

      public int purgeMETAR(int age) throws DAOException
      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

      public int purgeTAF(int age) throws DAOException
      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