Class GetStatistics
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetStatistics
A Data Access Object to retrieve Airline statistics.
- Since:
- 1.0
- Version:
- 11.1
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getActivePilots
(String dbName) Returns the number of active Pilots in an Airline.Returns Airline Totals.long
getCoolerStatistics
(int days) Retrieves Water Cooler post counts.Returns Water Cooler posting statistics for a number of users.Returns membership Join date statistics.getMembershipQuantiles
(int splitInto) Returns membership data by percentiles.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
-
GetStatistics
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getAirlineTotals
Returns Airline Totals. This method is synchronized across all instances because of the expense of the database queries.- Returns:
- the AirlineTotals for this airline
- Throws:
DAOException
- if a JDBC error occurs
-
getActivePilots
Returns the number of active Pilots in an Airline.- Parameters:
dbName
- the database name- Returns:
- the number of Active/On Leave pilots
- Throws:
DAOException
- if a JDBC error occurs
-
getMembershipQuantiles
Returns membership data by percentiles.- Parameters:
splitInto
- the number of segments to divide into- Returns:
- a Map of percentile and joining date.
- Throws:
DAOException
- if a JDBC error occurs
-
getJoinStats
Returns membership Join date statistics.- Returns:
- a Collection of MembershipTotals beans
- Throws:
DAOException
- if a JDBC error occurs
-
getCoolerStatistics
Returns Water Cooler posting statistics for a number of users.- Parameters:
ids
- a Collection of database IDs- Returns:
- a Map of post counts, indexed by database ID
- Throws:
DAOException
- if a JDBC error occurs
-
getCoolerStatistics
Retrieves Water Cooler post counts.- Parameters:
days
- the number of days in the past to count- Returns:
- the number of posts in the specified interval
- Throws:
DAOException
- if a JDBC error occurs
-