org.deltava.dao
Class GetCachedRoutes
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetCachedRoutes
public class GetCachedRoutes
- extends DAO
A Data Access Object to load cached external routes from the database.
- Since:
- 2.6
- Version:
- 2.6
- Author:
- Luke
| 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 |
GetCachedRoutes
public GetCachedRoutes(Connection c)
- Initializes the Data Access Object.
- Parameters:
c - the JDBC connection to use
getAverageAge
public int getAverageAge(Airport aD,
Airport aA)
throws DAOException
- Retrieves the average age of cached routes between two airports.
- Parameters:
aD - the departure Airport beanaA - the arrival Airport bean
- Returns:
- the average age in days, or -1 if none found
- Throws:
DAOException - if a JDBC error occurs
getRoutes
public Collection<? extends FlightRoute> getRoutes(Airport aD,
Airport aA)
throws DAOException
- Loads all the cached routes between two airports.
- Parameters:
aD - the departure Airport beanaA - the arrival Airport bean
- Returns:
- a Collection of FlightRoute beans
- Throws:
DAOException - if a JDBC error occurs
Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.