Class GetXACARS

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

public class GetXACARS extends DAO
A Data Access Object for reading XACARS data from the database.
Since:
4.1
Version:
9.0
Author:
Luke
  • Constructor Details

    • GetXACARS

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

    • getID

      public int getID(int userID, Flight f) throws DAOException
      Retrieves an XACARS flight ID from a flight number and user.
      Parameters:
      userID - the user's database ID
      f - the Flight information
      Returns:
      a Flight ID, or zero if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getFlight

      public XAFlightInfo getFlight(int id) throws DAOException
      Retrieves an XACARS flight record.
      Parameters:
      id - the flight ID
      Returns:
      a FlightInfo bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getActive

      public Collection<XAFlightInfo> getActive() throws DAOException
      Returns XACARS flights with a position report submitted within the last 30 minutes.
      Returns:
      a Collection of XAFlightInfo beans
      Throws:
      DAOException - if a JDBC error occurs
    • getPositions

      public Collection<XARouteEntry> getPositions(int flightID) throws DAOException
      Retrieves all position entries associated with a particular flight.
      Parameters:
      flightID - the XACARS flight ID
      Returns:
      a Collection of PositionInfo beans
      Throws:
      DAOException - if a JDBC error occurs