Class GetRawSchedule
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetRawSchedule
A Data Access Object to load raw schedule entries.
- Since:
- 8.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
Modifier and TypeMethodDescriptionget
(ScheduleSource src, int line) Loads an individual raw schedule entry.getAirlines
(ScheduleSource src, Airport a) Returns the Airlines that service a particular Airport in a schedule source.getDays
(ScheduleSource src, Airport a, boolean isDestination) Returns the days of the week an Airport has flights from a particular schedule source.Returns the mapping of Airlines to Schedule sources.getSources
(boolean isLoaded, String db) Returns all raw schedule sources.list
(ScheduleSource src, Airport aD, Airport aA) Lists all raw schedule entries between two Airports from a particular schedule source.load
(ScheduleSource src, LocalDate ld) Loads all raw schedule entries for a particular day of the week.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
-
GetRawSchedule
Initializes the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getSources
Returns all raw schedule sources.- Parameters:
isLoaded
- TRUE to only include loaded sources, otherwise FALSEdb
- the database name- Returns:
- a Collection of ScheduleSourceInfo beans
- Throws:
DAOException
- if a JDBC error occurs
-
getSourceAirlines
Returns the mapping of Airlines to Schedule sources.- Returns:
- a Map of Collections of Airlines, keyed by ScheduleSource
- Throws:
DAOException
- if a JDBC error occurs
-
get
Loads an individual raw schedule entry.- Parameters:
src
- the ScheduleSourceline
- the source line number- Returns:
- a RawScheduleEntry, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getAirlines
Returns the Airlines that service a particular Airport in a schedule source.- Parameters:
src
- the ScheduleSource or null for alla
- the Airport- Returns:
- a Collection of Airline beans
- Throws:
DAOException
- if a JDBC error occurs
-
getDays
public Collection<DayOfWeek> getDays(ScheduleSource src, Airport a, boolean isDestination) throws DAOException Returns the days of the week an Airport has flights from a particular schedule source.- Parameters:
src
- the ScheduleSource, or null for alla
- the AirportisDestination
- TRUE if selecting arriving flights, otherwise FALSE- Returns:
- a Collection of DayOfWeek enums
- Throws:
DAOException
- if a JDBC error occurs
-
list
Lists all raw schedule entries between two Airports from a particular schedule source.- Parameters:
src
- a ScheduleSourceaD
- the departure Airport, or null for allaA
- the arrival Airport, or null for all- Returns:
- a List of RawScheduleEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-
load
Loads all raw schedule entries for a particular day of the week.- Parameters:
src
- the ScheduleSourceld
- the schedule effective date, or null for all- Returns:
- a Collection of RawScheduleEntry beans
- Throws:
DAOException
- if a JDBC error occurs
-