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()
           
 java.util.List<ServiceCalendarDate> getCalendarDatesForServiceId(AgencyAndId serviceId)
          ServiceCalendarDate Methods
 ServiceCalendar getCalendarForServiceId(AgencyAndId serviceId)
          ServiceCalendar Methods
 java.util.List<Frequency> getFrequenciesForTrip(Trip trip)
          Frequency Methods
 java.util.List<Route> getRoutesForAgency(Agency agency)
          Route Methods
 java.util.List<ShapePoint> getShapePointsForShapeId(AgencyAndId shapeId)
          ShapePoint Methods
 java.util.List<StopTime> getStopTimesForStop(Stop stop)
           
 java.util.List<StopTime> getStopTimesForTrip(Trip trip)
           
 java.util.List<java.lang.String> getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId)
          ServiceId Methods
 java.util.List<Trip> getTripsForBlockId(AgencyAndId blockId)
           
 java.util.List<Trip> getTripsForRoute(Route route)
          Trip Methods
 
Methods inherited from class org.onebusaway.gtfs.impl.GtfsDaoImpl
getAgencyForId, getAllAgencies, getAllCalendarDates, getAllCalendars, getAllFareAttributes, getAllFareRules, getAllFrequencies, getAllPathways, getAllRoutes, getAllShapePoints, getAllStops, getAllStopTimes, getAllTransfers, getAllTrips, getCalendarDateForId, getCalendarForId, getFareAttributeForId, getFareRuleForId, 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, setGenerateIds
 
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
 
Methods inherited from interface org.onebusaway.gtfs.services.GtfsDao
getAgencyForId, getAllAgencies, getAllCalendarDates, getAllCalendars, getAllFareAttributes, getAllFareRules, getAllFrequencies, getAllPathways, getAllRoutes, getAllShapePoints, getAllStops, getAllStopTimes, getAllTransfers, getAllTrips, getCalendarDateForId, getCalendarForId, getFareAttributeForId, getFareRuleForId, 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 java.util.List<java.lang.String> getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId)
Description copied from interface: GtfsRelationalDao
ServiceId Methods

Specified by:
getTripAgencyIdsReferencingServiceId in interface GtfsRelationalDao

getRoutesForAgency

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

Specified by:
getRoutesForAgency in interface GtfsRelationalDao

getShapePointsForShapeId

public java.util.List<ShapePoint> getShapePointsForShapeId(AgencyAndId shapeId)
Description copied from interface: GtfsRelationalDao
ShapePoint Methods

Specified by:
getShapePointsForShapeId in interface GtfsRelationalDao

getStopTimesForTrip

public java.util.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 java.util.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 java.util.List<Trip> getTripsForRoute(Route route)
Description copied from interface: GtfsRelationalDao
Trip Methods

Specified by:
getTripsForRoute in interface GtfsRelationalDao

getTripsForBlockId

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

getFrequenciesForTrip

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

Specified by:
getFrequenciesForTrip in interface GtfsRelationalDao

getCalendarDatesForServiceId

public java.util.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


Copyright © 2010 OneBusAway. All Rights Reserved.