Class SetSELCAL
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetSELCAL
A Data Access Object to write aircraft SELCAL data.
- Since:
- 1.0
- Version:
- 9.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
Deletes an aircraft SELCAL code from the database.int
free
(int days) Frees aircraft SELCAL codes reserved for a set interval.void
Releases an aircraft SELCAL code reservation.void
Reserves an aircraft SELCAL code for a particular Pilot.void
write
(SelectCall sc) Adds or updates an aircraft SELCAL code.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
-
SetSELCAL
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
write
Adds or updates an aircraft SELCAL code.- Parameters:
sc
- the SelectCall bean- Throws:
DAOException
- if a JDBC error occurs
-
reserve
Reserves an aircraft SELCAL code for a particular Pilot.- Parameters:
code
- the SELCAL codepilotID
- the database ID of the Pilot- Throws:
DAOException
- if a JDBC error occurs
-
free
Releases an aircraft SELCAL code reservation.- Parameters:
code
- the SELCAL code- Throws:
DAOException
- if a JDBC error occurs
-
delete
Deletes an aircraft SELCAL code from the database.- Parameters:
code
- the SELCAL code- Throws:
DAOException
- if a JDBC error occursNullPointerException
- if code is null
-
free
Frees aircraft SELCAL codes reserved for a set interval.- Parameters:
days
- the interval in days- Returns:
- the number of codes freed up
- Throws:
DAOException
- if a JDBC error occurs
-