Class GetEvent

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

public class GetEvent extends DAO
A Data Access Object to load Online Event data.
Since:
1.0
Version:
11.6
Author:
Luke
  • Constructor Details

    • GetEvent

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

    • getFutureEvents

      public List<Event> getFutureEvents() throws DAOException
      Returns all future Online Events that have not been canceled.
      Returns:
      a List of Event beans
      Throws:
      DAOException - if a JDBC error occurs
    • getAssignableEvents

      public List<Event> getAssignableEvents() throws DAOException
      Returns all future Online Events with signups that are available for assignment.
      Returns:
      a List of Event beans
      Throws:
      DAOException - if a JDBC error occurs
    • getPossibleEvents

      public List<Event> getPossibleEvents(RoutePair rp, OnlineNetwork net, Instant dt, String airlineCode) throws DAOException
      Returns possible Online Events within a given time period.
      Parameters:
      rp - the RoutePair
      net - the OnlineNetwork
      dt - the start date/time
      airlineCode - the airline code
      Returns:
      a List of Events
      Throws:
      DAOException - if a JDBC error occurs
    • getWithFeedback

      public List<Event> getWithFeedback() throws DAOException
      Returns Online Events with user feedback.
      Returns:
      a List of Events
      Throws:
      DAOException - if a JDBC error occurs
    • getPossibleEvents

      public List<Event> getPossibleEvents(FlightReport fr, String airlineCode) throws DAOException
      Returns possible Online Events for a particular flight. For non-FDR flight reports, this will select an Event that started prior to the submission date and ended less than 2 days before the submission date.
      Parameters:
      fr - the FlightReport
      airlineCode - the Airline Code
      Returns:
      a List of Events
      Throws:
      DAOException - if a JDBC error occurs
    • getEventCalendar

      public List<Event> getEventCalendar(DateRange dr) throws DAOException
      Returns all Online Events within a certain date range.
      Parameters:
      dr - the DateRange
      Returns:
      a List of Event beans
      Throws:
      DAOException - if a JDBC error occurs
    • hasFutureEvents

      public boolean hasFutureEvents() throws DAOException
      Returns whether there are any active Online Events schedule.
      Returns:
      TRUE if at least one Event is scheduled, otherwise FALSE
      Throws:
      DAOException - if a JDBC error occurs
    • getEvents

      public List<Event> getEvents() throws DAOException
      Returns all Online Events.
      Returns:
      a List of Event beans
      Throws:
      DAOException - if a JDBC error occurs
    • getWithACARS

      public Collection<Event> getWithACARS() throws DAOException
      Returns all Online Events with ACARS-logged flights.
      Returns:
      a Collection of Event beans
      Throws:
      DAOException - if a JDBC error occurs
    • get

      public Event get(int id) throws DAOException
      Returns a particular Online Event.
      Parameters:
      id - the Online Event database ID
      Returns:
      the Online Event bean, or null if not found
      Throws:
      DAOException - if a JDBC error occurs
    • getMyEventIDs

      public Collection<Integer> getMyEventIDs(int userID) throws DAOException
      Returns the events which a user has signed up for or participated in.
      Parameters:
      userID - the user's database ID
      Returns:
      a Collection of Event IDs
      Throws:
      DAOException - if a JDBC error occurs