Class SetPilotMerge


public class SetPilotMerge extends PilotWriteDAO
A Data Access Object to merge a Pilot's data into another.
Since:
1.0
Version:
11.1
Author:
Luke
  • Constructor Details

    • SetPilotMerge

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

    • mergeFlights

      public int mergeFlights(Pilot oldUser, Pilot newUser) throws DAOException
      Merges Flight Reports.
      Parameters:
      oldUser - the old Pilot bean
      newUser - the new Pilot bean
      Returns:
      the number of FlightReports updated
      Throws:
      DAOException - if a JDBC error occurs
    • mergeExams

      public int mergeExams(Pilot oldUser, Pilot newUser) throws DAOException
      Merges Examinations.
      Parameters:
      oldUser - the old Pilot bean
      newUser - the new Pilot bean
      Returns:
      the number of Examinations updated
      Throws:
      DAOException - if a JDBC error occurs
    • mergeCheckRides

      public int mergeCheckRides(Pilot oldUser, Pilot newUser) throws DAOException
      Merges Check Rides.
      Parameters:
      oldUser - the old Pilot bean
      newUser - the new Pilot bean
      Returns:
      the number of Check Rides updated
      Throws:
      DAOException - if a JDBC error occurs
    • mergeCourses

      public int mergeCourses(Pilot oldUser, Pilot newUser) throws DAOException
      Merges Flight Academy courses.
      Parameters:
      oldUser - the old Pilot bean
      newUser - the new Pilot bean
      Returns:
      the number of Courses updated
      Throws:
      DAOException - if a JDBC error occurs