Class SetElite


public class SetElite extends EliteDAO
A Data Access Object to update Elite status level definitions.
Since:
9.2
Version:
11.5
Author:
Luke
  • Constructor Details

    • SetElite

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

    • write

      public void write(EliteLevel lvl) throws DAOException
      Updates an Elite level in the database.
      Parameters:
      lvl - the EliteLevel
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(EliteStatus es) throws DAOException
      Updates a Pilot's Elite Status in the database.
      Parameters:
      es - an EliteStatus bean
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(EliteLifetime el) throws DAOException
      Writes a lifetime Elite status bean to the database.
      Parameters:
      el - the EliteLifetime bean
      Throws:
      DAOException - if a JDBC error occurs
    • write

      public void write(EliteLifetimeStatus els) throws DAOException
      Writes a Pilot Elite lifetime status accomplishment bean to the database.
      Parameters:
      els - the EliteLifetimeStatus bean
      Throws:
      DAOException - if a JDBC error occurs
    • rollover

      public void rollover(YearlyTotal yt) throws DAOException
      Rolls over flight legs and distance into a new Elite year.
      Parameters:
      yt - a YearlyTotal bean with the amounts to be rolled over
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(String name, int year) throws DAOException
      Deletes an Elite level from the database.
      Parameters:
      name - the level name
      year - the level year
      Throws:
      DAOException - if a JDBC error occurs
    • delete

      public void delete(String code) throws DAOException
      Deletes a lifetime Elite level from the database.
      Parameters:
      code - the level code
      Throws:
      DAOException - if a JDBC error occurs
    • clear

      public void clear(int pilotID, int year, boolean includeRollover) throws DAOException
      Resets a Pilot's Elite status for a particular year.
      Parameters:
      pilotID - the Pilot's database ID
      year - the year
      includeRollover -
      Throws:
      DAOException - if a JDBC error occurs