Class GetAirline
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetAirline
A Data Access Object to load Airline codes and names.
- Since:
- 1.0
- Version:
- 11.2
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
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
-
GetAirline
Creates the DAO with a JDBC connection.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getAll
Returns all Airlines from the database.- Returns:
- a Map of Airline objects, with the code as the key
- Throws:
DAOException
- if a JDBC error occurs
-
getActive
Returns all active Airlines from the database.- Returns:
- a Map of Airline objects where isActive() == TRUE with the code as the key
- Throws:
DAOException
- if a JDBC error occurs
-
get
Returns an Airline object.- Parameters:
code
- the Airline code to get- Returns:
- the Airline, or null if the code was not found
- Throws:
DAOException
- if a JDBC error occursNullPointerException
- if code is null
-