Class SetCachedRoutes

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

public class SetCachedRoutes extends DAO
A Data Access Object to saved cached flight routes to the database.
Since:
2.6
Version:
9.0
Author:
Luke
  • Constructor Details

    • SetCachedRoutes

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

    • write

      public void write(Collection<? extends FlightRoute> routes) throws DAOException
      Writes a number of Flight routes to the database.
      Parameters:
      routes -
      Throws:
      DAOException
    • purge

      public void purge(RoutePair rp) throws DAOException
      Purges all saved routes between two airports from the database.
      Parameters:
      rp - the RoutePair
      Throws:
      DAOException - if a JDBC error occurs
    • purge

      public int purge(int days) throws DAOException
      Purges routes older than a certain date.
      Parameters:
      days - the number of days old to purge
      Returns:
      the number of routes purged
      Throws:
      DAOException - if a JDBC error occurs