Package org.onebusaway.gtfs.impl
Class GtfsDaoImpl
- java.lang.Object
-
- org.onebusaway.gtfs.impl.GenericDaoImpl
-
- org.onebusaway.gtfs.impl.GtfsDaoImpl
-
- All Implemented Interfaces:
GenericDao,GenericMutableDao,GtfsDao,GtfsMutableDao
- Direct Known Subclasses:
GtfsRelationalDaoImpl
public class GtfsDaoImpl extends GenericDaoImpl implements GtfsMutableDao
-
-
Field Summary
Fields Modifier and Type Field Description static String[]OPTIONAL_FILE_NAMES
-
Constructor Summary
Constructors Constructor Description GtfsDaoImpl()
-
Method Summary
-
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.GenericMutableDao
flush, open, saveOrUpdateEntity, updateEntity
-
Methods inherited from interface org.onebusaway.gtfs.services.GtfsDao
hasFaresV1, hasFaresV2
-
-
-
-
Field Detail
-
OPTIONAL_FILE_NAMES
public static final String[] OPTIONAL_FILE_NAMES
-
-
Method Detail
-
isPackStopTimes
public boolean isPackStopTimes()
-
setPackStopTimes
public void setPackStopTimes(boolean packStopTimes)
-
isPackShapePoints
public boolean isPackShapePoints()
-
setPackShapePoints
public void setPackShapePoints(boolean packShapePoints)
-
getAgencyForId
public Agency getAgencyForId(String id)
GtfsDaoInterface- Specified by:
getAgencyForIdin interfaceGtfsDao
-
getAllAgencies
public Collection<Agency> getAllAgencies()
Description copied from interface:GtfsDaoAgency Methods- Specified by:
getAllAgenciesin interfaceGtfsDao
-
getAllBlocks
public Collection<Block> getAllBlocks()
- Specified by:
getAllBlocksin interfaceGtfsDao
-
getAllCalendarDates
public Collection<ServiceCalendarDate> getAllCalendarDates()
Description copied from interface:GtfsDaoServiceCalendarDateMethods- Specified by:
getAllCalendarDatesin interfaceGtfsDao
-
getAllCalendars
public Collection<ServiceCalendar> getAllCalendars()
Description copied from interface:GtfsDaoServiceCalendarMethods- Specified by:
getAllCalendarsin interfaceGtfsDao
-
getAllFareAttributes
public Collection<FareAttribute> getAllFareAttributes()
Description copied from interface:GtfsDaoFareAttributeMethods- Specified by:
getAllFareAttributesin interfaceGtfsDao
-
getAllFareRules
public Collection<FareRule> getAllFareRules()
Description copied from interface:GtfsDaoFareRuleMethods- Specified by:
getAllFareRulesin interfaceGtfsDao
-
getAllFeedInfos
public Collection<FeedInfo> getAllFeedInfos()
Description copied from interface:GtfsDaoFeedInfoMethods- Specified by:
getAllFeedInfosin interfaceGtfsDao
-
getAllFrequencies
public Collection<Frequency> getAllFrequencies()
Description copied from interface:GtfsDaoFrequencyMethods- Specified by:
getAllFrequenciesin interfaceGtfsDao
-
getAllRoutes
public Collection<Route> getAllRoutes()
Description copied from interface:GtfsDaoRouteMethods- Specified by:
getAllRoutesin interfaceGtfsDao
-
getAllRouteStops
public Collection<RouteStop> getAllRouteStops()
- Specified by:
getAllRouteStopsin interfaceGtfsDao
-
getAllRouteShapes
public Collection<RouteShape> getAllRouteShapes()
- Specified by:
getAllRouteShapesin interfaceGtfsDao
-
getAllShapePoints
public Collection<ShapePoint> getAllShapePoints()
Description copied from interface:GtfsDaoShapePointMethods- Specified by:
getAllShapePointsin interfaceGtfsDao
-
getAllStopTimes
public Collection<StopTime> getAllStopTimes()
Description copied from interface:GtfsDaoStopTimeMethods- Specified by:
getAllStopTimesin interfaceGtfsDao
-
getAllStops
public Collection<Stop> getAllStops()
Description copied from interface:GtfsDaoStopMethods- Specified by:
getAllStopsin interfaceGtfsDao
-
getAllTransfers
public Collection<Transfer> getAllTransfers()
Description copied from interface:GtfsDaoTransferMethods- Specified by:
getAllTransfersin interfaceGtfsDao
-
getAllTrips
public Collection<Trip> getAllTrips()
Description copied from interface:GtfsDaoTripMethods- Specified by:
getAllTripsin interfaceGtfsDao
-
getAllRiderships
public Collection<Ridership> getAllRiderships()
- Specified by:
getAllRidershipsin interfaceGtfsDao
-
getAllVehicles
public Collection<Vehicle> getAllVehicles()
Description copied from interface:GtfsDaoVehicleMethods- Specified by:
getAllVehiclesin interfaceGtfsDao
-
getAllLevels
public Collection<Level> getAllLevels()
- Specified by:
getAllLevelsin interfaceGtfsDao
-
getBlockForId
public Block getBlockForId(int id)
- Specified by:
getBlockForIdin interfaceGtfsDao
-
getCalendarDateForId
public ServiceCalendarDate getCalendarDateForId(int id)
- Specified by:
getCalendarDateForIdin interfaceGtfsDao
-
getCalendarForId
public ServiceCalendar getCalendarForId(int id)
- Specified by:
getCalendarForIdin interfaceGtfsDao
-
getFareAttributeForId
public FareAttribute getFareAttributeForId(AgencyAndId id)
- Specified by:
getFareAttributeForIdin interfaceGtfsDao
-
getAllFareLegRules
public Collection<FareLegRule> getAllFareLegRules()
Description copied from interface:GtfsDaoFareLegRuleMethods- Specified by:
getAllFareLegRulesin interfaceGtfsDao
-
getAllFareProducts
public Collection<FareProduct> getAllFareProducts()
Description copied from interface:GtfsDaoFareProductMethods- Specified by:
getAllFareProductsin interfaceGtfsDao
-
getFareProductForId
public FareProduct getFareProductForId(AgencyAndId id)
- Specified by:
getFareProductForIdin interfaceGtfsDao
-
getAllFareMedia
public Collection<FareMedium> getAllFareMedia()
Description copied from interface:GtfsDaoFareMediumMethods- Specified by:
getAllFareMediain interfaceGtfsDao
-
getAllRiderCategories
public Collection<RiderCategory> getAllRiderCategories()
Description copied from interface:GtfsDaoRiderCategoryMethods- Specified by:
getAllRiderCategoriesin interfaceGtfsDao
-
getFareRuleForId
public FareRule getFareRuleForId(int id)
- Specified by:
getFareRuleForIdin interfaceGtfsDao
-
getAllFareTransferRules
public Collection<FareTransferRule> getAllFareTransferRules()
Description copied from interface:GtfsDaoFareTransferRuleMethods- Specified by:
getAllFareTransferRulesin interfaceGtfsDao
-
getFeedInfoForId
public FeedInfo getFeedInfoForId(String id)
- Specified by:
getFeedInfoForIdin interfaceGtfsDao
-
getFrequencyForId
public Frequency getFrequencyForId(int id)
- Specified by:
getFrequencyForIdin interfaceGtfsDao
-
getAllPathways
public Collection<Pathway> getAllPathways()
Description copied from interface:GtfsDaoPathwayMethods- Specified by:
getAllPathwaysin interfaceGtfsDao
-
getPathwayForId
public Pathway getPathwayForId(AgencyAndId id)
- Specified by:
getPathwayForIdin interfaceGtfsDao
-
getRouteForId
public Route getRouteForId(AgencyAndId id)
- Specified by:
getRouteForIdin interfaceGtfsDao
-
getShapePointForId
public ShapePoint getShapePointForId(int id)
- Specified by:
getShapePointForIdin interfaceGtfsDao
-
getStopForId
public Stop getStopForId(AgencyAndId id)
- Specified by:
getStopForIdin interfaceGtfsDao
-
getStopTimeForId
public StopTime getStopTimeForId(int id)
- Specified by:
getStopTimeForIdin interfaceGtfsDao
-
getTransferForId
public Transfer getTransferForId(int id)
- Specified by:
getTransferForIdin interfaceGtfsDao
-
getTripForId
public Trip getTripForId(AgencyAndId id)
- Specified by:
getTripForIdin interfaceGtfsDao
-
getLevelForId
public Level getLevelForId(AgencyAndId id)
- Specified by:
getLevelForIdin interfaceGtfsDao
-
getVehicleForId
public Vehicle getVehicleForId(AgencyAndId id)
Description copied from interface:GtfsDaoVehicleMethods- Specified by:
getVehicleForIdin interfaceGtfsDao
-
getFacilityForId
public Facility getFacilityForId(AgencyAndId id)
-
getFacilityPropertiesForId
public FacilityProperty getFacilityPropertiesForId(AgencyAndId id)
-
getFacilityPropertiesDefinitionsForId
public FacilityPropertyDefinition getFacilityPropertiesDefinitionsForId(AgencyAndId id)
-
getRouteNameExceptionForId
public RouteNameException getRouteNameExceptionForId(AgencyAndId id)
-
getDirectionNameExceptionForId
public DirectionNameException getDirectionNameExceptionForId(AgencyAndId id)
-
getAlternateStopNameExceptionForId
public AlternateStopNameException getAlternateStopNameExceptionForId(AgencyAndId id)
-
getAllDirectionEntries
public Collection<DirectionEntry> getAllDirectionEntries()
- Specified by:
getAllDirectionEntriesin interfaceGtfsDao
-
getAllFacilities
public Collection<Facility> getAllFacilities()
-
getAllFacilityProperties
public Collection<FacilityProperty> getAllFacilityProperties()
-
getAllFacilityPropertyDefinitions
public Collection<FacilityPropertyDefinition> getAllFacilityPropertyDefinitions()
-
getAllRouteNameExceptions
public Collection<RouteNameException> getAllRouteNameExceptions()
-
getAllDirectionNameExceptions
public Collection<DirectionNameException> getAllDirectionNameExceptions()
-
getAllAlternateStopNameExceptions
public Collection<AlternateStopNameException> getAllAlternateStopNameExceptions()
-
getAllWrongWayConcurrencies
public Collection<WrongWayConcurrency> getAllWrongWayConcurrencies()
- Specified by:
getAllWrongWayConcurrenciesin interfaceGtfsDao
-
getAllAreas
public Collection<Area> getAllAreas()
Description copied from interface:GtfsDaoAreaMethods- Specified by:
getAllAreasin interfaceGtfsDao
-
getAllLocationGroupElements
public Collection<LocationGroupElement> getAllLocationGroupElements()
- Specified by:
getAllLocationGroupElementsin interfaceGtfsDao
-
getAllLocationGroups
public Collection<LocationGroup> getAllLocationGroups()
- Specified by:
getAllLocationGroupsin interfaceGtfsDao
-
getAllStopAreaElements
public Collection<StopAreaElement> getAllStopAreaElements()
- Specified by:
getAllStopAreaElementsin interfaceGtfsDao
-
getAllStopAreas
public Collection<StopArea> getAllStopAreas()
- Specified by:
getAllStopAreasin interfaceGtfsDao
-
getAllLocations
public Collection<Location> getAllLocations()
- Specified by:
getAllLocationsin interfaceGtfsDao
-
getAllBookingRules
public Collection<BookingRule> getAllBookingRules()
- Specified by:
getAllBookingRulesin interfaceGtfsDao
-
getAllTranslations
public Collection<Translation> getAllTranslations()
Description copied from interface:GtfsDaoTranslationMethods- Specified by:
getAllTranslationsin interfaceGtfsDao
-
getEntitiesByIdForEntityType
public <K,V> Map<K,V> getEntitiesByIdForEntityType(Class<K> keyType, Class<V> entityType)
GenericMutableDaoInterface- Overrides:
getEntitiesByIdForEntityTypein classGenericDaoImpl
-
getAllEntitiesForType
public <T> Collection<T> getAllEntitiesForType(Class<T> type)
Description copied from class:GenericDaoImplGenericMutableDaoInterface- Specified by:
getAllEntitiesForTypein interfaceGenericDao- Overrides:
getAllEntitiesForTypein classGenericDaoImpl
-
getEntityForId
public <T> T getEntityForId(Class<T> type, Serializable id)
- Specified by:
getEntityForIdin interfaceGenericDao- Overrides:
getEntityForIdin classGenericDaoImpl
-
saveEntity
public void saveEntity(Object entity)
- Specified by:
saveEntityin interfaceGenericMutableDao- Overrides:
saveEntityin classGenericDaoImpl
-
clearAllEntitiesForType
public <T> void clearAllEntitiesForType(Class<T> type)
- Specified by:
clearAllEntitiesForTypein interfaceGenericMutableDao- Overrides:
clearAllEntitiesForTypein classGenericDaoImpl
-
removeEntity
public <K extends Serializable,T extends IdentityBean<K>> void removeEntity(T entity)
- Specified by:
removeEntityin interfaceGenericMutableDao- Overrides:
removeEntityin classGenericDaoImpl
-
close
public void close()
- Specified by:
closein interfaceGenericMutableDao- Overrides:
closein classGenericDaoImpl
-
getOptionalMetadataFilenames
public List<String> getOptionalMetadataFilenames()
- Specified by:
getOptionalMetadataFilenamesin interfaceGtfsDao
-
hasMetadata
public boolean hasMetadata(String filename)
- Specified by:
hasMetadatain interfaceGtfsDao
-
getMetadata
public String getMetadata(String filename)
- Specified by:
getMetadatain interfaceGtfsDao
-
addMetadata
public void addMetadata(String filename, String content)
- Specified by:
addMetadatain interfaceGtfsDao
-
-