Class EliteDAO

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.EliteDAO
Direct Known Subclasses:
GetElite, GetEliteStatistics, SetElite

abstract class EliteDAO extends DAO
A Data Access Object to read Elite program definitions.
Since:
9.2
Version:
11.5
Author:
Luke
  • Field Details

    • _lvlCache

      protected static final Cache<EliteLevel> _lvlCache
      The EliteLevel cache.
    • _stCache

      protected static final Cache<EliteStatus> _stCache
      The Elite status cache.
    • _lstCache

      protected static final Cache<EliteLifetimeStatus> _lstCache
      The Elite lifetime status cache.
  • Constructor Details

    • EliteDAO

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

    • get

      public EliteLevel get(String name, int year, String dbName) throws DAOException
      Returns an Elite status level for a particular year.
      Parameters:
      name - the level name
      year - the year
      dbName - the database name
      Returns:
      an EliteLevel, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getLifetime

      public EliteLifetime getLifetime(String code, String dbName) throws DAOException
      Returns a lifetime Elite status level.
      Parameters:
      code - the level code
      dbName - the database name
      Returns:
      an EliteLifetime, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • executeLevel

      protected static List<EliteLevel> executeLevel(PreparedStatement ps) throws SQLException
      Helper method to parse Elite level result sets.
      Parameters:
      ps - the PreparedStatement to execute
      Returns:
      a List of EliteLevel beans
      Throws:
      SQLException - if a JDBC error occurs
    • executeLifetime

      protected static List<EliteLifetime> executeLifetime(PreparedStatement ps) throws SQLException
      Helper method to process Elite lifetime level result sets.
      Parameters:
      ps - the PreparedStatement to execute
      Returns:
      a List of EliteLifetime beans
      Throws:
      SQLException - if a JDBC error occurs
    • populateLevels

      protected void populateLevels(Collection<? extends EliteLevelBean> data) throws DAOException
      Helper method to populate EliteLevel beans.
      Parameters:
      data - a Collection of EliteLeveBeans
      Throws:
      DAOException - if a JDBC error occurs