Class SetAssignment
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetAssignment
A Data Access Object to create and update Flight Assignments.
- Since:
- 1.0
- Version:
- 10.6
- 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
assign
(AssignmentInfo a, int pilotID, String db) Assigns a Flight Assignment to a particular Pilot.void
complete
(AssignmentInfo ai, boolean allowIncomplete) Marks an Assignment as Complete.void
Deletes a Flight Assignment from the database.void
delete
(CharterRequest req) Deletes a Charter flight request from the database.void
Releases a Flight Assignment.void
write
(AssignmentInfo a, String db) Writes a new Flight Assignment to the database.void
write
(CharterRequest req) Writes a Charter flight request 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
-
SetAssignment
Initialize the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
write
Writes a new Flight Assignment to the database. Any FlightReport beans within the assignment will have the Assignment Database ID updated.- Parameters:
a
- the Assingment objectdb
- the Database to write to- Throws:
DAOException
- if a JDBC error occurs
-
assign
Assigns a Flight Assignment to a particular Pilot.- Parameters:
a
- the Assignment, with status and assignDate properties setpilotID
- the Pilot's Database IDdb
- the Database to write to- Throws:
DAOException
- if a JDBC error occurs
-
complete
Marks an Assignment as Complete.- Parameters:
ai
- the AssignmentInfo objectallowIncomplete
- TRUE if uncompleted flights are allowed (like when releasing an assignment), otherwise FALSE- Throws:
DAOException
- if a JDBC error occurs, or draft flights are found when not allowed
-
reset
Releases a Flight Assignment.- Parameters:
a
- the Flight Assignment bean- Throws:
DAOException
- if a JDBC error occurs
-
delete
Deletes a Flight Assignment from the database.- Parameters:
a
- the Assignment- Throws:
DAOException
- if a JDBC error occurs
-
write
Writes a Charter flight request to the database.- Parameters:
req
- the CharterRequest- Throws:
DAOException
- if a JDBC error occurs
-
delete
Deletes a Charter flight request from the database.- Parameters:
req
- the CharterRequest- Throws:
DAOException
- if a JDBC error occurs
-