Class GetCharterRequests
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetCharterRequests
A Data Access Object to retrieve Charter flight requests from the database.
- Since:
- 10.0
- Version:
- 10.0
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget
(int id) Retrieves a specific Charter request from the database.getAll()
Retrieves all Charter requests from the database.getByPilot
(int pilotID) Retrieves all Charter requests for a specific Pilot from the database.int
Returns the number of pending Charter requests.Returns the database IDs of all Pilots who have created a Charter flight Request.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
-
GetCharterRequests
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
get
Retrieves a specific Charter request from the database.- Parameters:
id
- the request database ID- Returns:
- the CharterRequest, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getAll
Retrieves all Charter requests from the database.- Returns:
- a List of CharterRequest beans
- Throws:
DAOException
- if a JDBC error occurs
-
getPendingCount
Returns the number of pending Charter requests.- Returns:
- the number of pending requests
- Throws:
DAOException
- if a JDBC error occurs
-
getPilotIDs
Returns the database IDs of all Pilots who have created a Charter flight Request.- Returns:
- a Collection of database IDs
- Throws:
DAOException
- if a JDBC error occurs
-
getByPilot
Retrieves all Charter requests for a specific Pilot from the database.- Parameters:
pilotID
- the Pilot database ID- Returns:
- a List of CharterRequest beans
- Throws:
DAOException
- if a JDBC error occurs
-