Class GetTour
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetTour
A Data Access Object to read Tour data from the database.
- Since:
- 10.0
- Version:
- 11.6
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves all Tours that contain a particular Flight leg.Loads a Tour from the database.getAll()
Retrieves all Tours from the database.getPilotProgress
(int pilotID, String dbName) Returns the number of Flights Legs in each Flight Tour completed by a particular Pilot.getProgress
(int tourID) Returns progress by Pilot for a particular Tour.Retrieves all Tours from the database that have user feedback.Retrieves all Tours from the database that have at least one Flight Report linked to them.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
-
GetTour
Initializes the Data Access Object.- Parameters:
c
- the JDBC Connection to use
-
-
Method Details
-
get
Loads a Tour from the database.- Parameters:
id
- the database IDdbName
- the database name- Returns:
- a Tour or null if not found
- Throws:
DAOException
-
getAll
Retrieves all Tours from the database.- Returns:
- a Collection of Tour beans
- Throws:
DAOException
- if a JDBC error occurs
-
getWithFlights
Retrieves all Tours from the database that have at least one Flight Report linked to them.- Returns:
- a Collection of Tour beans
- Throws:
DAOException
- if a JDBC error occurs
-
getWithFeedback
Retrieves all Tours from the database that have user feedback.- Returns:
- a Collection of Tour beans
- Throws:
DAOException
- if a JDBC error occurs
-
getProgress
Returns progress by Pilot for a particular Tour.- Parameters:
tourID
- the Tour database ID- Returns:
- a Collection of TourProgress beans
- Throws:
DAOException
- if a JDBC error occurs
-
getPilotProgress
Returns the number of Flights Legs in each Flight Tour completed by a particular Pilot.- Parameters:
pilotID
- the Pilot's database IDdbName
- the database name- Returns:
- a Collection of TourProgress beans
- Throws:
DAOException
- if a JDBC error occurs
-
findLeg
Retrieves all Tours that contain a particular Flight leg.- Parameters:
rp
- the RoutePairdt
- the flight datedbName
- the database name- Returns:
- a List of Tour beans, sorted by descending matching leg number
- Throws:
DAOException
- if a JDBC error occurs
-