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 DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassign(AssignmentInfo a, int pilotID, String db) Assigns a Flight Assignment to a particular Pilot.voidcomplete(AssignmentInfo ai, boolean allowIncomplete) Marks an Assignment as Complete.voidDeletes a Flight Assignment from the database.voiddelete(CharterRequest req) Deletes a Charter flight request from the database.voidReleases a Flight Assignment.voidwrite(AssignmentInfo a, String db) Writes a new Flight Assignment to the database.voidwrite(CharterRequest req) Writes a Charter flight request to the database.Methods inherited from class 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
-