Class SetStatusUpdate

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.SetStatusUpdate

public class SetStatusUpdate extends DAO
A Data Access Object to write status updates for a Pilot to the database.
Since:
1.0
Version:
10.0
Author:
Luke
  • Constructor Details

    • SetStatusUpdate

      public SetStatusUpdate(Connection c)
      Initializes the Data Access Object.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • write

      public void write(StatusUpdate update, String dbName) throws DAOException
      Writes the Status Update log entry to a database.
      Parameters:
      update - the Status Update entry
      dbName - the database name
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(Collection<StatusUpdate> updates) throws DAOException
      Writes a number of Status Update entries to the database.
      Parameters:
      updates - a Collection of StatusUpdates
      Throws:
      DAOException - if a JDBC error occurs
    • clearLOA

      public void clearLOA(int id) throws DAOException
      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