Class SetStatusUpdate
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetStatusUpdate
A Data Access Object to write status updates for a Pilot to the database.
- Since:
- 1.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 TypeMethodDescriptionvoid
clearLOA
(int id) Clears spurious Leave of Absence records created within 24 hours if a Pilot returns from an LOA immediately.void
write
(Collection<StatusUpdate> updates) Writes a number of Status Update entries to the database.void
write
(StatusUpdate update, String dbName) Writes the Status Update log entry to a 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
-
SetStatusUpdate
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
write
Writes the Status Update log entry to a database.- Parameters:
update
- the Status Update entrydbName
- the database name- Throws:
DAOException
- if a JDBC error occurs
-
write
Writes a number of Status Update entries to the database.- Parameters:
updates
- a Collection of StatusUpdates- Throws:
DAOException
- if a JDBC error occurs
-
clearLOA
Clears spurious Leave of Absence records created within 24 hours if a Pilot returns from an LOA immediately.- Parameters:
id
- the Pilot database ID- Throws:
DAOException
- if a JDBC error occurs
-