Class SetExam
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetExam
A Data Access Object to write Pilot Examinations and Check Rides to the database.
- Since:
- 1.0
- Version:
- 11.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 TypeMethodDescriptionvoid
Saves a single answer to an examination.void
Deletes a Pilot Examination or Check Ride from the database.void
deleteCheckRides
(int courseID) Deletes unflown Check Rides from a Flight Academy Course.void
Links a CheckRide to a Flight Academy course.void
update
(Examination ex) Updates an existing Pilot Examination in the database.void
Updates Examination correct answer statistics.void
Writes a Check Ride to the database.void
write
(Examination ex) Writes a new Pilot Examination to the database.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
-
SetExam
Initialize the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
write
Writes a new Pilot Examination to the database. This will update the database ID for the Examination bean with the automatically generated ID column value.- Parameters:
ex
- the Examination to write- Throws:
DAOException
- if a JDBC error occurs
-
update
Updates an existing Pilot Examination in the database.- Parameters:
ex
- the Examination to update- Throws:
DAOException
- if a JDBC error occurs
-
write
Writes a Check Ride to the database. This can handle inserts and updates.- Parameters:
cr
- the Check Ride object- Throws:
DAOException
- if a JDBC error occurs
-
linkCheckRide
Links a CheckRide to a Flight Academy course.- Parameters:
cr
- the CheckRide bean- Throws:
DAOException
- if a JDBC error occurs
-
answer
Saves a single answer to an examination. This is used by a web service- Parameters:
examID
- the Examination database IDq
- the Question bean- Throws:
DAOException
- if a JDBC error occurs
-
updateStats
Updates Examination correct answer statistics.- Parameters:
e
- the Examination bean- Throws:
DAOException
- if a JDBC error occurs
-
deleteCheckRides
Deletes unflown Check Rides from a Flight Academy Course.- Parameters:
courseID
- the database ID of the Course- Throws:
DAOException
- if a JDBC error occurs
-
delete
Deletes a Pilot Examination or Check Ride from the database.- Parameters:
t
- the Examination/Checkride- Throws:
DAOException
- if a JDBC error occurs
-