Class SetExamQuestion
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetExamQuestion
A Data Access Object to write Examination Question profiles to the database.
- Since:
- 3.6
- 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
clearImage
(int id) Deletes a Question Profile image resource from the database.void
Deletes an Examination Question profile from the database.void
write
(QuestionProfile qp) Writes an Examination Question Profile to the database.void
Updates the Examinations that can use this Question.void
Writes a Question Profile image resource 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
-
SetExamQuestion
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
write
Writes an Examination Question Profile to the database. This call can handle both INSERT and UPDATE operations. If an INSERT operation is performed, the auto-assigned database ID will be set in the bean.- Parameters:
qp
- the QuestionProfile bean to write- Throws:
DAOException
- if a JDBC error occurs
-
writeExams
Updates the Examinations that can use this Question.- Parameters:
qp
- the QuestionProfile bean- Throws:
DAOException
- if a JDBC error occurs
-
writeImage
Writes a Question Profile image resource to the database.- Parameters:
qp
- the QuestionProfile bean- Throws:
DAOException
- if a JDBC error occursIllegalArgumentException
- if the Image bean is not populated
-
clearImage
Deletes a Question Profile image resource from the database.- Parameters:
id
- the Question Profile database ID- Throws:
DAOException
- if a JDBC error occurs
-
delete
Deletes an Examination Question profile from the database.- Parameters:
qp
- the QuestionProfile bean- Throws:
DAOException
- if a JDBC error occurs
-