Class SetPilot

Direct Known Subclasses:
SetPilotTransfer

public class SetPilot extends PilotWriteDAO
A Data Access Object to update Pilot profiles.
Since:
1.0
Version:
10.3
Author:
Luke
  • Constructor Details

    • SetPilot

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

    • write

      public void write(Pilot p, String db) throws DAOException
      Updates an existing Pilot profile.
      Parameters:
      p - the Pilot profile to update
      db - the database to write to
      Throws:
      DAOException - if a JDBC error occurs
    • setLocation

      public void setLocation(int pilotID, GeoLocation loc) throws DAOException
      Updates a Pilot's location for the member board.
      Parameters:
      pilotID - the Pilot's database ID
      loc - the Pilot's location
      Throws:
      DAOException - if a JDBC error occurs
    • setHomeTown

      public void setHomeTown(int pilotID, GeocodeResult gr) throws DAOException
      Sets the pilot's Home town.
      Parameters:
      pilotID - the Pilot's database ID
      gr - the Geocoding results.
      Throws:
      DAOException - if a JDBC error occurs
    • clearLocation

      public void clearLocation(int pilotID) throws DAOException
      Clears this Pilot's locatoin.
      Parameters:
      pilotID - the Pilot's database ID
      Throws:
      DAOException - if a JDBC error occurs
    • assignID

      public void assignID(Pilot p, String db) throws DAOException
      Assigns a Pilot ID to a Pilot.
      Parameters:
      p - the Pilot bean
      db - the database name
      Throws:
      DAOException - if a JDBC error occurs
    • addRatings

      public void addRatings(Pilot p, Collection<String> ratings, String db) throws DAOException
      Adds equipment ratings to a particular Pilot.
      Parameters:
      p - the Pilot bean
      ratings - a Collection of ratings
      db - the database name
      Throws:
      DAOException - if a JDBC error occurs