Class GetFlightReportStatistics
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetFlightReportStatistics
A Data Access Object to retrieve Flight Report statistics.
- Since:
- 2.1
- Version:
- 11.6
- Author:
- Luke
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAirport
(boolean isACARS) Returns Airports with flights.int
getCharterCount
(int pilotID, int days, Instant dt) Returns the number of Charter flights flown by a Pilot in a particular time interval.Retrieves aggregated Charter Flight Report statistics.getEQPIREPStatistics
(String eqType, String groupBy, String orderBy) Retrieves aggregated approved Flight Report statistics for Flights flown using aircraft that are Primary Ratings for a particular Equipment Type program.getLandingCounts
(int pilotID, int range) Returns the number of landings within a particular vertical speed range.getLandingData
(int pilotID) Returns touchdown speed and runway distance data for all of a Pilot's flights.getLandings
(int pilotID) Returns statistical information about a pilot's landing speeds and variations between them.getLandings
(String eqType, int minLandings) Returns statistical information about landing speeds and variations between them.getLandingScores
(int pilotID) Calculcates landing scores over time.Loads flight/distance statistics by Pilot for a one year interval.getPIREPStatistics
(int pilotID, FlightStatsSort s, FlightStatsGroup grp) Retrieves aggregated approved Flight Report statistics.getPopularRoutes
(boolean noRoutes, boolean allFlights) Returns the most popular route pairs filed by Pilots.getPopularRoutes
(int pilotID) Retrieves the most popular route pairs filed by a particular Pilot.getSimulatorStatistics
(int pilotID) Returns simulator statistics by date and stage.getStageStatistics
(int pilotID) Returns flight statistics by date and stage.getStatistics
(Collection<Integer> IDs, int days, FlightStatsSort s) Retrieves flight statistics for an arbitrary set of Pilots.Returns all the Flight Reports without an Elite score.void
setDayFilter
(int days) Sets the maximum number of days in the past to include.Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeIDs, executeUpdate, executeUpdate, expandDate, formatDBName, formatLocation, getNewID, getQueryCount, prepare, prepareWithoutLimits, rollbackTransaction, setQueryMax, setQueryStart, setQueryTimeout, startTransaction, toID, toID, toInstant
-
Constructor Details
-
GetFlightReportStatistics
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
setDayFilter
public void setDayFilter(int days) Sets the maximum number of days in the past to include.- Parameters:
days
- the number of days- Since:
- 2.1
-
getAirport
Returns Airports with flights.- Parameters:
isACARS
- TRUE to include only ACARS flights, otherwise FALSE- Returns:
- a Collection of RoutePair objects
- Throws:
DAOException
- if a JDBC error occurs
-
getPopularRoutes
Retrieves the most popular route pairs filed by a particular Pilot.- Parameters:
pilotID
- the Pilot database ID- Returns:
- a Collection of RouteStats beans
- Throws:
DAOException
- if a JDBC error occurs
-
getPopularRoutes
public Collection<ScheduleRoute> getPopularRoutes(boolean noRoutes, boolean allFlights) throws DAOException Returns the most popular route pairs filed by Pilots.- Parameters:
noRoutes
- TRUE to include pairs without dispatch routes only, otherwise FALSEallFlights
- TRUE to include Flight Reports without ACARS, otherwise FALSE- Returns:
- a Collection of RoutePair beans
- Throws:
DAOException
- if a JDBC error occurs
-
getLandings
public Collection<LandingStatistics> getLandings(String eqType, int minLandings) throws DAOException Returns statistical information about landing speeds and variations between them.- Parameters:
eqType
- the aircraft typeminLandings
- the minimum number of landings to qualify- Returns:
- a Collection of LandingStatistics beans
- Throws:
DAOException
- if a JDBC error occurs
-
getLandingData
Returns touchdown speed and runway distance data for all of a Pilot's flights.- Parameters:
pilotID
- the Pilot's database ID- Returns:
- a Collection of TouchdownData beans
- Throws:
DAOException
- if a JDBC error occurs
-
getLandings
Returns statistical information about a pilot's landing speeds and variations between them.- Parameters:
pilotID
- the Pilot's database ID- Returns:
- a List of LandingStatistics beans
- Throws:
DAOException
- if a JDBC error occurs
-
getLandingCounts
Returns the number of landings within a particular vertical speed range.- Parameters:
pilotID
- the Pilot's database IDrange
- the size of the vertical speed ranges- Returns:
- a Map of landing counts keyed by vertical speed range
- Throws:
DAOException
- if a JDBC error occurs
-
getLandingScores
Calculcates landing scores over time.- Parameters:
pilotID
- the Pilot's database ID- Returns:
- a Collection of LandingStatsEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-
getEQPIREPStatistics
public Collection<FlightStatsEntry> getEQPIREPStatistics(String eqType, String groupBy, String orderBy) throws DAOException Retrieves aggregated approved Flight Report statistics for Flights flown using aircraft that are Primary Ratings for a particular Equipment Type program.- Parameters:
eqType
- the Equipment type namegroupBy
- the "GROUP BY" column nameorderBy
- the "ORDER BY" column name- Returns:
- a Collection of FlightStatsEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-
getCharterStatistics
public Collection<FlightStatsEntry> getCharterStatistics(FlightStatsSort s, FlightStatsGroup grp) throws DAOException Retrieves aggregated Charter Flight Report statistics.- Parameters:
s
- the statistics sorting optiongrp
- the statistics grouping option- Returns:
- a Collection of FlightStatsEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-
getPilotTotals
Loads flight/distance statistics by Pilot for a one year interval.- Parameters:
sd
- the start date- Returns:
- a List of YearlyTotal beans
- Throws:
DAOException
- if a JDBC error occurs- See Also:
-
getCharterCount
Returns the number of Charter flights flown by a Pilot in a particular time interval.- Parameters:
pilotID
- the Pilot's datbase IDdays
- the number of days backwards, zero for alldt
- the end date/time- Returns:
- the number of approved Charter flights
- Throws:
DAOException
- if a JDBC error occurs
-
getStageStatistics
Returns flight statistics by date and stage.- Parameters:
pilotID
- the Pilot's database ID or zero for all pilots- Returns:
- a Collection of StageStatsEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-
getSimulatorStatistics
Returns simulator statistics by date and stage.- Parameters:
pilotID
- the Pilot's database ID or zero for all pilots- Returns:
- a Collection of SimStatsEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-
getUnscoredFlights
Returns all the Flight Reports without an Elite score.- Returns:
- a Collection of Flight Report database IDs
- Throws:
DAOException
- if a JDBC error occurs
-
getStatistics
public Collection<FlightStatsEntry> getStatistics(Collection<Integer> IDs, int days, FlightStatsSort s) throws DAOException Retrieves flight statistics for an arbitrary set of Pilots.- Parameters:
IDs
- a Collection of database IDsdays
- the number of days back to aggregates
- the statistics sorting option- Returns:
- a Collection of FlightStatsEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-
getPIREPStatistics
public Collection<FlightStatsEntry> getPIREPStatistics(int pilotID, FlightStatsSort s, FlightStatsGroup grp) throws DAOException Retrieves aggregated approved Flight Report statistics.- Parameters:
pilotID
- the Pilot's database ID, or zero if airline-wides
- the statistics sorting optiongrp
- the statistics grouping option- Returns:
- a Collection of FlightStatsEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-