Class SetPilotLogin


public class SetPilotLogin extends PilotWriteDAO
A Data Access Object to track user logins and logouts.
Since:
1.0
Version:
10.0
Author:
Luke
  • Constructor Details

    • SetPilotLogin

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

    • login

      public void login(int id, String hostName, String dbName) throws DAOException
      Write the pilot's last login date to the database. This also resets the Pilot's status to ACTIVE, if on leave.
      Parameters:
      id - the Pilot's database ID
      hostName - the host from which the Pilot is logging in from
      dbName - the database name
      Throws:
      DAOException - if a JDBC error occurs
    • logout

      public void logout(int id, String dbName) throws DAOException
      Write the pilot's last logout date to the database.
      Parameters:
      id - the Pilot's database ID
      dbName - the database name
      Throws:
      DAOException - if a JDBC error occurs