Class GetNominations
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetNominations
A Data Access Object to load Senior Captain nominations.
- Since:
- 3.3
- Version:
- 9.0
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget
(int id) Returns the most recent Nomination for a Pilot.Loads a Nomination for a Pilot.Returns all Nominations for a particular quarter.getByAuthor
(int authorID) Returns the nominations a user has made in the current quarter.getByEQType
(String eqType) Returns all nominations for pilots in a particular equipment program in the current Quarter.getByStatus
(Nomination.Status status, Quarter q) Returns all nominations in a particular status.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
-
GetNominations
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getByAuthor
Returns the nominations a user has made in the current quarter.- Parameters:
authorID
- the author's database ID- Returns:
- a Collection of Nomination beans
- Throws:
DAOException
- if a JDBC error occurs
-
getByStatus
Returns all nominations in a particular status.- Parameters:
status
- the Nomination statusq
- the Quarter- Returns:
- a List of Nomination beans
- Throws:
DAOException
- if a JDBC error occurs
-
getByEQType
Returns all nominations for pilots in a particular equipment program in the current Quarter.- Parameters:
eqType
- the equipment program- Returns:
- a List of Nomination beans
- Throws:
DAOException
- if a JDBC error occurs
-
get
Returns the most recent Nomination for a Pilot.- Parameters:
id
- the Pilot's database ID- Returns:
- a Nomination bean, or null if none found
- Throws:
DAOException
- if a JDBC error occurs
-
get
Loads a Nomination for a Pilot.- Parameters:
id
- the Pilot's database IDq
- the Quarter- Returns:
- a Nomination bean, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getAll
Returns all Nominations for a particular quarter.- Parameters:
q
- the Quarter- Returns:
- a List of Nominations
- Throws:
DAOException
- if a JDBC error occurs
-