Class GetInactivity
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.PilotReadDAO
org.deltava.dao.GetInactivity
A Data Access Object to read Inactivity purge entries. This DAO extends PilotReadDAO since it is used
to query pilots who may not have an Inactivity purge table entry, but are eligible for one.
- Since:
- 1.0
- Version:
- 9.0
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.PilotReadDAO
_cache
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInactivePilots
(int days) Returns the IDs of Pilots who have not logged in for a certain number of days.getInactivity
(int pilotID) Returns inactivity data for a particular Pilot.Returns purge entries for all pilots who are eligible to be purged.getRepeatInactive
(int loginDays, int activityDays, int minPosts) Returns the IDs of Pilots who have not participated in the period prior to the Inactivity warning.Methods inherited from class org.deltava.dao.PilotReadDAO
execute, get, get, get, getByID, getByName, loadAccomplishments, loadChildRows, loadIMAddrs, loadPushEndpoints, loadRatings, loadRoles, updatePilotCodes
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
-
GetInactivity
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getInactivity
Returns inactivity data for a particular Pilot.- Parameters:
pilotID
- the Pilot's database ID- Returns:
- an InactivityPurge bean, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getPurgeable
Returns purge entries for all pilots who are eligible to be purged.- Returns:
- a Collection of InactivityPurge beans
- Throws:
DAOException
- if a JDBC error occurs
-
getInactivePilots
Returns the IDs of Pilots who have not logged in for a certain number of days.- Parameters:
days
- the number of days- Returns:
- a Collection of database IDs
- Throws:
DAOException
- if a JDBC error occurs
-
getRepeatInactive
public Collection<Integer> getRepeatInactive(int loginDays, int activityDays, int minPosts) throws DAOException Returns the IDs of Pilots who have not participated in the period prior to the Inactivity warning.- Parameters:
loginDays
- the number of days since their last loginactivityDays
- the number of days to check for Flight Reports, Cooler posts or ExaminationsminPosts
- the minimum number of Cooler posts- Returns:
- a Collection of database IDs
- Throws:
DAOException
- if a JDBC error occurs
-