Class GetExam
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetExam
A Data Access Object for loading Examination/Check Ride data.
- Since:
- 1.0
- Version:
- 11.2
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAcademyCheckRides
(int courseID) Loads all Check Rides for a particular Flight Academy Course.getAcademyCheckRides
(int courseID, TestStatus status) Loads all Check Rides for a particular Flight Academy Course.getACARSCheckRide
(int acarsID) Loads a Pilot Check Ride associated with a particular ACARS Flight ID.int
getActiveExam
(int id) Checks if a Pilot has an Examination open or awaiting scoring.getAutoScored
(String examName) Returns automatically scored Examiantions.Returns the names of all automatically scored examinations.getCheckRide
(int id) Loads a Pilot Check Ride.getCheckRide
(int pilotID, String eqType, TestStatus status) Loads a pending Pilot Check Ride for a particular equipment type.getCheckRideQueue
(boolean isAcademy) Returns all submitted Check Rides for the current airline or the Flight Academy.getCheckRides
(int pilotID) Loads all Check Rides for a particular Pilot.getExam
(int id) Loads a Pilot Examination.getExams
(int id) Loads all examinations and check rides for a particular Pilot.getExamTimes
(boolean isAcademy) Returns the minimum and maximum time available to take Examinations.getPendingRides
(int days, RideType rt) Returns all unsubmitted Check Rides older than a certain date.Returns all Initial Questionnaires for hired Pilots.Loads all submitted Examinations.Returns all unsubmitted Check Rides for the current airline.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
-
GetExam
Initialize the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getExam
Loads a Pilot Examination.- Parameters:
id
- the Database ID- Returns:
- the Examination, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getCheckRide
Loads a Pilot Check Ride.- Parameters:
id
- the Database ID- Returns:
- the CheckRide, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getACARSCheckRide
Loads a Pilot Check Ride associated with a particular ACARS Flight ID.- Parameters:
acarsID
- the ACARS flight ID- Returns:
- a CheckRide, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getAcademyCheckRides
Loads all Check Rides for a particular Flight Academy Course.- Parameters:
courseID
- the Course database ID- Returns:
- a List of CheckRide beans
- Throws:
DAOException
- if a JDBC error occurs
-
getAcademyCheckRides
Loads all Check Rides for a particular Flight Academy Course.- Parameters:
courseID
- the Course database IDstatus
- the CheckRide status, or null for all- Returns:
- a List of CheckRide beans
- Throws:
DAOException
- if a JDBC error occurs
-
getCheckRide
Loads a pending Pilot Check Ride for a particular equipment type.- Parameters:
pilotID
- the Pilot Database IDeqType
- the equipment type usedstatus
- the CheckRide status- Returns:
- a CheckRide, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getCheckRides
Loads all Check Rides for a particular Pilot.- Parameters:
pilotID
- the pilot Database ID- Returns:
- a List of CheckRide beans
- Throws:
DAOException
- if a JDBC error occurs
-
getSubmittedRides
Returns all unsubmitted Check Rides for the current airline.- Returns:
- a List of CheckRide beans
- Throws:
DAOException
- if a JDBC error occurs
-
getPendingRides
Returns all unsubmitted Check Rides older than a certain date.- Parameters:
days
- the number of daysrt
- a RideType- Returns:
- a List of CheckRide beans
- Throws:
DAOException
- if a JDBC error occurs
-
getCheckRideQueue
Returns all submitted Check Rides for the current airline or the Flight Academy.- Parameters:
isAcademy
- TRUE if listing Flight Academy Check Rides, otherwise FALSE- Returns:
- a Collection of CheckRide beans
- Throws:
DAOException
- if a JDBC error occurs
-
getExams
Loads all examinations and check rides for a particular Pilot.- Parameters:
id
- the Pilot's Database ID- Returns:
- a List of Tests
- Throws:
DAOException
- if a JDBC error occurs
-
getAutoScored
Returns automatically scored Examiantions.- Parameters:
examName
- the Examination name, or null if all requested- Returns:
- a Collection of Examination beans
- Throws:
DAOException
- if a JDBC error occurs
-
getAutoScoredExamNames
Returns the names of all automatically scored examinations.- Returns:
- a Collection of Examination names
- Throws:
DAOException
- if a JDBC error occurs
-
getQuestionnaires
Returns all Initial Questionnaires for hired Pilots.- Parameters:
ids
- a Collection of Pilot database IDs- Returns:
- a Map of Examination beans keyed by Pilot ID
- Throws:
DAOException
- if a JDBC error occurs
-
getSubmitted
Loads all submitted Examinations.- Returns:
- a List of Examinations
- Throws:
DAOException
- if a JDBC error occurs
-
getActiveExam
Checks if a Pilot has an Examination open or awaiting scoring.- Parameters:
id
- the Pilot's database ID- Returns:
- TRUE if an Examination is in NEW or SUBMITTED status
- Throws:
DAOException
- if a JDBC error occurs
-
getExamTimes
Returns the minimum and maximum time available to take Examinations.- Parameters:
isAcademy
- TRUE for Flight Academy examinations, FALSE for non-Academy- Returns:
- a Tuple with the minimum and maximum times, in minutes
- Throws:
DAOException
- if a JDBC error occurs
-