Class SetApplicant


public class SetApplicant extends PilotWriteDAO
A Data Access Object to write Applicants to the database.
Since:
1.0
Version:
11.0
Author:
Luke
  • Constructor Details

    • SetApplicant

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

    • reject

      public void reject(Applicant a) throws DAOException
      Marks an Applicant as Rejected.
      Parameters:
      a - the Applicant object
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(Applicant a) throws DAOException
      Writes an Applicant to the database.
      Parameters:
      a - the Applicant object
      Throws:
      DAOException - if a JDBC error occurs
    • hire

      public void hire(Applicant a) throws DAOException
      Marks an Applicant as hired, and updates the Pilot ID.
      Parameters:
      a - the Applicant bean
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(int id) throws DAOException
      Deletes an Applicant from the database. Unlike Pilots, applicants can be deleted. This call updates the APPLICANTS and common.USERDATA tables.
      Parameters:
      id - the Applicant database ID
      Throws:
      DAOException - if a JDBC error occurs