Package org.onebusaway.gtfs.impl
Class GtfsRelationalDaoImpl
- java.lang.Object
-
- org.onebusaway.gtfs.impl.GenericDaoImpl
-
- org.onebusaway.gtfs.impl.GtfsDaoImpl
-
- org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl
-
- All Implemented Interfaces:
GenericDao,GenericMutableDao,GtfsDao,GtfsMutableDao,GtfsMutableRelationalDao,GtfsRelationalDao
public class GtfsRelationalDaoImpl extends GtfsDaoImpl implements GtfsMutableRelationalDao
A in-memory implementation of GtfsRelationalDaoImpl. It's super fast for most methods, but only if you have enough memory to load your entire GTFS into memory.- Author:
- bdferris
-
-
Field Summary
-
Fields inherited from class org.onebusaway.gtfs.impl.GtfsDaoImpl
OPTIONAL_FILE_NAMES
-
-
Constructor Summary
Constructors Constructor Description GtfsRelationalDaoImpl()
-
Method Summary
-
Methods inherited from class org.onebusaway.gtfs.impl.GtfsDaoImpl
addMetadata, clearAllEntitiesForType, close, getAgencyForId, getAllAgencies, getAllAlternateStopNameExceptions, getAllAreas, getAllBlocks, getAllBookingRules, getAllCalendarDates, getAllCalendars, getAllDirectionEntries, getAllDirectionNameExceptions, getAllEntitiesForType, getAllFacilities, getAllFacilityProperties, getAllFacilityPropertyDefinitions, getAllFareAttributes, getAllFareLegRules, getAllFareMedia, getAllFareProducts, getAllFareRules, getAllFareTransferRules, getAllFeedInfos, getAllFrequencies, getAllLevels, getAllLocationGroupElements, getAllLocationGroups, getAllLocations, getAllPathways, getAllRiderCategories, getAllRiderships, getAllRouteNameExceptions, getAllRoutes, getAllRouteShapes, getAllRouteStops, getAllShapePoints, getAllStopAreaElements, getAllStopAreas, getAllStops, getAllStopTimes, getAllTransfers, getAllTranslations, getAllTrips, getAllVehicles, getAllWrongWayConcurrencies, getAlternateStopNameExceptionForId, getBlockForId, getCalendarDateForId, getCalendarForId, getDirectionNameExceptionForId, getEntitiesByIdForEntityType, getEntityForId, getFacilityForId, getFacilityPropertiesDefinitionsForId, getFacilityPropertiesForId, getFareAttributeForId, getFareProductForId, getFareRuleForId, getFeedInfoForId, getFrequencyForId, getLevelForId, getMetadata, getOptionalMetadataFilenames, getPathwayForId, getRouteForId, getRouteNameExceptionForId, getShapePointForId, getStopForId, getStopTimeForId, getTransferForId, getTripForId, getVehicleForId, hasMetadata, isPackShapePoints, isPackStopTimes, removeEntity, saveEntity, setPackShapePoints, setPackStopTimes
-
Methods inherited from class org.onebusaway.gtfs.impl.GenericDaoImpl
clear, flush, getEntityClasses, open, saveOrUpdateEntity, setGenerateIds, updateEntity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onebusaway.gtfs.services.GenericDao
getAllEntitiesForType, getEntityForId
-
Methods inherited from interface org.onebusaway.gtfs.services.GenericMutableDao
clearAllEntitiesForType, close, flush, open, removeEntity, saveEntity, saveOrUpdateEntity, updateEntity
-
Methods inherited from interface org.onebusaway.gtfs.services.GtfsDao
addMetadata, getAgencyForId, getAllAgencies, getAllAreas, getAllBlocks, getAllBookingRules, getAllCalendarDates, getAllCalendars, getAllDirectionEntries, getAllFareAttributes, getAllFareLegRules, getAllFareMedia, getAllFareProducts, getAllFareRules, getAllFareTransferRules, getAllFeedInfos, getAllFrequencies, getAllLevels, getAllLocationGroupElements, getAllLocationGroups, getAllLocations, getAllPathways, getAllRiderCategories, getAllRiderships, getAllRoutes, getAllRouteShapes, getAllRouteStops, getAllShapePoints, getAllStopAreaElements, getAllStopAreas, getAllStops, getAllStopTimes, getAllTransfers, getAllTranslations, getAllTrips, getAllVehicles, getAllWrongWayConcurrencies, getBlockForId, getCalendarDateForId, getCalendarForId, getFareAttributeForId, getFareProductForId, getFareRuleForId, getFeedInfoForId, getFrequencyForId, getLevelForId, getMetadata, getOptionalMetadataFilenames, getPathwayForId, getRouteForId, getShapePointForId, getStopForId, getStopTimeForId, getTransferForId, getTripForId, getVehicleForId, hasFaresV1, hasFaresV2, hasMetadata
-
-
-
-
Method Detail
-
clearAllCaches
public void clearAllCaches()
-
getTripAgencyIdsReferencingServiceId
public List<String> getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId)
Description copied from interface:GtfsRelationalDaoServiceId Methods- Specified by:
getTripAgencyIdsReferencingServiceIdin interfaceGtfsRelationalDao
-
getRoutesForAgency
public List<Route> getRoutesForAgency(Agency agency)
Description copied from interface:GtfsRelationalDaoRoute Methods- Specified by:
getRoutesForAgencyin interfaceGtfsRelationalDao
-
getStopsForStation
public List<Stop> getStopsForStation(Stop station)
Description copied from interface:GtfsRelationalDaoStop Methods- Specified by:
getStopsForStationin interfaceGtfsRelationalDao
-
getStopsForZoneId
public List<Stop> getStopsForZoneId(String zoneId)
- Specified by:
getStopsForZoneIdin interfaceGtfsRelationalDao
-
getAllShapeIds
public List<AgencyAndId> getAllShapeIds()
Description copied from interface:GtfsRelationalDaoShapePointMethods- Specified by:
getAllShapeIdsin interfaceGtfsRelationalDao
-
getShapePointsForShapeId
public List<ShapePoint> getShapePointsForShapeId(AgencyAndId shapeId)
- Specified by:
getShapePointsForShapeIdin interfaceGtfsRelationalDao
-
getStopTimesForTrip
public List<StopTime> getStopTimesForTrip(Trip trip)
- Specified by:
getStopTimesForTripin interfaceGtfsRelationalDao- Returns:
- the list of
StopTimeobjects associated with the trip, sorted byStopTime.getStopSequence()
-
getStopTimesForStop
public List<StopTime> getStopTimesForStop(Stop stop)
- Specified by:
getStopTimesForStopin interfaceGtfsRelationalDao- Returns:
- the list of
StopTimeobjects associated with the specifiedStop, in no particular order
-
getTripsForRoute
public List<Trip> getTripsForRoute(Route route)
Description copied from interface:GtfsRelationalDaoTripMethods- Specified by:
getTripsForRoutein interfaceGtfsRelationalDao
-
getTripsForShapeId
public List<Trip> getTripsForShapeId(AgencyAndId shapeId)
- Specified by:
getTripsForShapeIdin interfaceGtfsRelationalDao
-
getTripsForServiceId
public List<Trip> getTripsForServiceId(AgencyAndId serviceId)
- Specified by:
getTripsForServiceIdin interfaceGtfsRelationalDao
-
getTripsForBlockId
public List<Trip> getTripsForBlockId(AgencyAndId blockId)
- Specified by:
getTripsForBlockIdin interfaceGtfsRelationalDao
-
getFrequenciesForTrip
public List<Frequency> getFrequenciesForTrip(Trip trip)
Description copied from interface:GtfsRelationalDaoFrequencyMethods- Specified by:
getFrequenciesForTripin interfaceGtfsRelationalDao
-
getAllServiceIds
public List<AgencyAndId> getAllServiceIds()
Description copied from interface:GtfsRelationalDaoServiceCalendarMethods- Specified by:
getAllServiceIdsin interfaceGtfsRelationalDao
-
getCalendarDatesForServiceId
public List<ServiceCalendarDate> getCalendarDatesForServiceId(AgencyAndId serviceId)
Description copied from interface:GtfsRelationalDaoServiceCalendarDateMethods- Specified by:
getCalendarDatesForServiceIdin interfaceGtfsRelationalDao
-
getCalendarForServiceId
public ServiceCalendar getCalendarForServiceId(AgencyAndId serviceId)
- Specified by:
getCalendarForServiceIdin interfaceGtfsRelationalDao
-
getFareRulesForFareAttribute
public List<FareRule> getFareRulesForFareAttribute(FareAttribute fareAttribute)
Description copied from interface:GtfsRelationalDao- Specified by:
getFareRulesForFareAttributein interfaceGtfsRelationalDao
-
getFareRulesForRoute
public List<FareRule> getFareRulesForRoute(Route route)
- Specified by:
getFareRulesForRoutein interfaceGtfsRelationalDao
-
getFareRulesForZoneId
public List<FareRule> getFareRulesForZoneId(String zoneId)
- Specified by:
getFareRulesForZoneIdin interfaceGtfsRelationalDao
-
getRidershipForTrip
public List<Ridership> getRidershipForTrip(AgencyAndId tripId)
Description copied from interface:GtfsRelationalDao- Specified by:
getRidershipForTripin interfaceGtfsRelationalDao
-
-