Class SetAcademy

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

public class SetAcademy extends DAO
A Data Access Object to write Flight Academy Course data to the database.
Since:
1.0
Version:
9.0
Author:
Luke
  • Constructor Details

    • SetAcademy

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

    • write

      public void write(Course c) throws DAOException
      Writes a Flight Academy Course entry to the database.
      Parameters:
      c - the Course bean
      Throws:
      DAOException - if a JDBC error occurs
    • comment

      public void comment(CourseComment cc) throws DAOException
      Writes a Course comment to the database.
      Parameters:
      cc - the CourseComment bean
      Throws:
      DAOException - if a JDBC error occurs
    • complete

      public void complete(int courseID, int seq) throws DAOException
      Marks a Course requirement as complete.
      Parameters:
      courseID - the Course database ID
      seq - the requirement ID
      Throws:
      DAOException - if a JDBC error occurs
    • updateProgress

      public void updateProgress(CourseProgress cp) throws DAOException
      Updates a Flight Academy Course progress entry.
      Parameters:
      cp - the CourseProgress bean
      Throws:
      DAOException - if a JDBC error occurs
    • setStatus

      public void setStatus(int courseID, Status s, Instant sd) throws DAOException
      Updates a Flight Academy Course's status.
      Parameters:
      courseID - the database ID of the course
      s - the Status
      sd - the updated course start date
      Throws:
      DAOException - if a JDBC error occurs
    • reassign

      public void reassign(int courseID, int newPilotID) throws DAOException
      Assigns a Flight Academy course to a different pilot, when transferring airlines.
      Parameters:
      courseID - the database ID of the course
      newPilotID - the database ID of the new Pilot
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(int courseID) throws DAOException
      Deletes a Flight Academy Course from the database.
      Parameters:
      courseID - the database ID of the course
      Throws:
      DAOException - if a JDBC error occurs
    • writeCertifications

      public void writeCertifications(TrainingVideo video) throws DAOException
      Writes all Flight Academy certifications associated with a particular Video.
      Parameters:
      video - the Video bean
      Throws:
      DAOException - if a JDBC error occurs