Class GetNominations

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetNominations

public class GetNominations extends DAO
A Data Access Object to load Senior Captain nominations.
Since:
3.3
Version:
9.0
Author:
Luke
  • Constructor Details

    • GetNominations

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

    • getByAuthor

      public List<Nomination> getByAuthor(int authorID) throws DAOException
      Returns the nominations a user has made in the current quarter.
      Parameters:
      authorID - the author's database ID
      Returns:
      a Collection of Nomination beans
      Throws:
      DAOException - if a JDBC error occurs
    • getByStatus

      public List<Nomination> getByStatus(Nomination.Status status, Quarter q) throws DAOException
      Returns all nominations in a particular status.
      Parameters:
      status - the Nomination status
      q - the Quarter
      Returns:
      a List of Nomination beans
      Throws:
      DAOException - if a JDBC error occurs
    • getByEQType

      public List<Nomination> getByEQType(String eqType) throws DAOException
      Returns all nominations for pilots in a particular equipment program in the current Quarter.
      Parameters:
      eqType - the equipment program
      Returns:
      a List of Nomination beans
      Throws:
      DAOException - if a JDBC error occurs
    • get

      public Nomination get(int id) throws DAOException
      Returns the most recent Nomination for a Pilot.
      Parameters:
      id - the Pilot's database ID
      Returns:
      a Nomination bean, or null if none found
      Throws:
      DAOException - if a JDBC error occurs
    • get

      public Nomination get(int id, Quarter q) throws DAOException
      Loads a Nomination for a Pilot.
      Parameters:
      id - the Pilot's database ID
      q - the Quarter
      Returns:
      a Nomination bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getAll

      public List<Nomination> getAll(Quarter q) throws DAOException
      Returns all Nominations for a particular quarter.
      Parameters:
      q - the Quarter
      Returns:
      a List of Nominations
      Throws:
      DAOException - if a JDBC error occurs