Class GetAssignment

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

public class GetAssignment extends DAO
A Data Access Object to load Flight Assignments. All calls in this DAO will populate the legs for any returned Flight Assignments, but will not populate any Flight Reports.
Since:
1.0
Version:
9.0
Author:
Luke
  • Constructor Details

    • GetAssignment

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

    • get

      public AssignmentInfo get(int id) throws DAOException
      Returns a Flight Assignment from the database.
      Parameters:
      id - the Assignment Database ID
      Returns:
      an Assignment bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getByPilot

      public List<AssignmentInfo> getByPilot(int pilotID, AssignmentStatus st) throws DAOException
      Returns all Flight Assignments for a particular Pilot.
      Parameters:
      pilotID - the Pilot's database ID
      st - an AssignmentStatus, or null for all
      Returns:
      a List of AssignmentInfo beans
      Throws:
      DAOException - if a JDBC error occurs
    • getByStatus

      public List<AssignmentInfo> getByStatus(AssignmentStatus status) throws DAOException
      Returns all Flight Assignments with a particular status.
      Parameters:
      status - the AssignmentStatus
      Returns:
      a List of AssignmentInfo beans
      Throws:
      DAOException - if a JDBC error occurs
    • getByEvent

      public List<AssignmentInfo> getByEvent(int eventID, String dbName) throws DAOException
      Returns all Flight Assignments related to a particular Online Event.
      Parameters:
      eventID - the Event database ID
      dbName - the database name
      Returns:
      a List of AssignmentInfo beans
      Throws:
      DAOException - if a JDBC error occurs
    • getByEquipmentType

      public List<AssignmentInfo> getByEquipmentType(String eqType, AssignmentStatus status) throws DAOException
      Return all Flight Assignment for a particular aircraft type and status.
      Parameters:
      eqType - the Equipment type
      status - the AssignmentStatus
      Returns:
      a List of AssignmentInfo beans
      Throws:
      DAOException - if a JDBC error occurs
    • getEquipmentTypes

      public Collection<String> getEquipmentTypes() throws DAOException
      Returns the equipment types with Flight Assignments.
      Returns:
      a List of Equipment type codes
      Throws:
      DAOException - if a JDBC error occurs