org.onebusaway.gtfs.impl
Class GtfsRelationalDaoImpl

java.lang.Object
  extended by org.onebusaway.gtfs.impl.GenericDaoImpl
      extended by org.onebusaway.gtfs.impl.GtfsDaoImpl
          extended by 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

Constructor Summary
GtfsRelationalDaoImpl()
           
 
Method Summary
 void clearAllCaches()
           
 List<AgencyAndId> getAllShapeIds()
          ShapePoint Methods
 List<ServiceCalendarDate> getCalendarDatesForServiceId(AgencyAndId serviceId)
          ServiceCalendarDate Methods
 ServiceCalendar getCalendarForServiceId(AgencyAndId serviceId)
          ServiceCalendar Methods
 List<FareRule> getFareRulesForFareAttribute(FareAttribute fareAttribute)
          FareRule
 List<Frequency> getFrequenciesForTrip(Trip trip)
          Frequency Methods
 List<Route> getRoutesForAgency(Agency agency)
          Route Methods
 List<ShapePoint> getShapePointsForShapeId(AgencyAndId shapeId)
           
 List<Stop> getStopsForStation(Stop station)
          Stop Methods
 List<StopTime> getStopTimesForStop(Stop stop)
           
 List<StopTime> getStopTimesForTrip(Trip trip)
           
 List<String> getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId)
          ServiceId Methods
 List<Trip> getTripsForBlockId(AgencyAndId blockId)
           
 List<Trip> getTripsForRoute(Route route)
          Trip Methods
 
Methods inherited from class org.onebusaway.gtfs.impl.GtfsDaoImpl
getAgencyForId, getAllAgencies, getAllCalendarDates, getAllCalendars, getAllFareAttributes, getAllFareRules, getAllFeedInfos, getAllFrequencies, getAllPathways, getAllRoutes, getAllShapePoints, getAllStops, getAllStopTimes, getAllTransfers, getAllTrips, getCalendarDateForId, getCalendarForId, getFareAttributeForId, getFareRuleForId, getFeedInfoForId, getFrequencyForId, getPathwayForId, getRouteForId, getShapePointForId, getStopForId, getStopTimeForId, getTransferForId, getTripForId
 
Methods inherited from class org.onebusaway.gtfs.impl.GenericDaoImpl
clearAllEntitiesForType, close, flush, getAllEntitiesForType, getEntitiesByIdForEntityType, getEntityClasses, getEntityForId, open, removeEntity, saveEntity, 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.GenericMutableDao
clearAllEntitiesForType, close, flush, open, removeEntity, saveEntity, saveOrUpdateEntity, updateEntity
 
Methods inherited from interface org.onebusaway.gtfs.services.GtfsDao
getAgencyForId, getAllAgencies, getAllCalendarDates, getAllCalendars, getAllFareAttributes, getAllFareRules, getAllFeedInfos, getAllFrequencies, getAllPathways, getAllRoutes, getAllShapePoints, getAllStops, getAllStopTimes, getAllTransfers, getAllTrips, getCalendarDateForId, getCalendarForId, getFareAttributeForId, getFareRuleForId, getFeedInfoForId, getFrequencyForId, getPathwayForId, getRouteForId, getShapePointForId, getStopForId, getStopTimeForId, getTransferForId, getTripForId
 
Methods inherited from interface org.onebusaway.gtfs.services.GenericDao
getAllEntitiesForType, getEntityForId
 

Constructor Detail

GtfsRelationalDaoImpl

public GtfsRelationalDaoImpl()
Method Detail

clearAllCaches

public void clearAllCaches()

getTripAgencyIdsReferencingServiceId

public List<String> getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId)
Description copied from interface: GtfsRelationalDao
ServiceId Methods

Specified by:
getTripAgencyIdsReferencingServiceId in interface GtfsRelationalDao

getRoutesForAgency

public List<Route> getRoutesForAgency(Agency agency)
Description copied from interface: GtfsRelationalDao
Route Methods

Specified by:
getRoutesForAgency in interface GtfsRelationalDao

getStopsForStation

public List<Stop> getStopsForStation(Stop station)
Description copied from interface: GtfsRelationalDao
Stop Methods

Specified by:
getStopsForStation in interface GtfsRelationalDao

getAllShapeIds

public List<AgencyAndId> getAllShapeIds()
Description copied from interface: GtfsRelationalDao
ShapePoint Methods

Specified by:
getAllShapeIds in interface GtfsRelationalDao

getShapePointsForShapeId

public List<ShapePoint> getShapePointsForShapeId(AgencyAndId shapeId)
Specified by:
getShapePointsForShapeId in interface GtfsRelationalDao

getStopTimesForTrip

public List<StopTime> getStopTimesForTrip(Trip trip)
Specified by:
getStopTimesForTrip in interface GtfsRelationalDao
Returns:
the list of StopTime objects associated with the trip, sorted by StopTime.getStopSequence()

getStopTimesForStop

public List<StopTime> getStopTimesForStop(Stop stop)
Specified by:
getStopTimesForStop in interface GtfsRelationalDao
Returns:
the list of StopTime objects associated with the specified Stop, in no particular order

getTripsForRoute

public List<Trip> getTripsForRoute(Route route)
Description copied from interface: GtfsRelationalDao
Trip Methods

Specified by:
getTripsForRoute in interface GtfsRelationalDao

getTripsForBlockId

public List<Trip> getTripsForBlockId(AgencyAndId blockId)
Specified by:
getTripsForBlockId in interface GtfsRelationalDao

getFrequenciesForTrip

public List<Frequency> getFrequenciesForTrip(Trip trip)
Description copied from interface: GtfsRelationalDao
Frequency Methods

Specified by:
getFrequenciesForTrip in interface GtfsRelationalDao

getCalendarDatesForServiceId

public List<ServiceCalendarDate> getCalendarDatesForServiceId(AgencyAndId serviceId)
Description copied from interface: GtfsRelationalDao
ServiceCalendarDate Methods

Specified by:
getCalendarDatesForServiceId in interface GtfsRelationalDao

getCalendarForServiceId

public ServiceCalendar getCalendarForServiceId(AgencyAndId serviceId)
Description copied from interface: GtfsRelationalDao
ServiceCalendar Methods

Specified by:
getCalendarForServiceId in interface GtfsRelationalDao

getFareRulesForFareAttribute

public List<FareRule> getFareRulesForFareAttribute(FareAttribute fareAttribute)
Description copied from interface: GtfsRelationalDao
FareRule

Specified by:
getFareRulesForFareAttribute in interface GtfsRelationalDao


Copyright © 2012 OneBusAway. All Rights Reserved.