org.onebusaway.transit_data_federation.bundle.services
Interface EntityReplacementStrategy

All Known Implementing Classes:
EntityReplacementStrategyImpl

public interface EntityReplacementStrategy

Generic interface to support swapping out one entity with another. Use primarily in GTFS loading to consolidate stops from GTFS feeds from separate agencies that have stops in common.

Author:
bdferris
See Also:
EntityReplacementStrategyFactory

Method Summary
 Serializable getReplacementEntityId(Class<?> entityType, Serializable id)
           
 boolean hasReplacementEntities(Class<?> entityType)
           
 boolean hasReplacementEntity(Class<?> entityType, Serializable id)
           
 

Method Detail

hasReplacementEntities

boolean hasReplacementEntities(Class<?> entityType)
Parameters:
entityType -
Returns:
true if there are any entity replacements for classes of the specified type

hasReplacementEntity

boolean hasReplacementEntity(Class<?> entityType,
                             Serializable id)
Parameters:
entityType -
id -
Returns:
true if there is an entity replacement for a entity with the specified type and id

getReplacementEntityId

Serializable getReplacementEntityId(Class<?> entityType,
                                    Serializable id)
Parameters:
entityType -
id -
Returns:
the replacement entity id for the target entity of specified type and id, or null if no replacement is needed


Copyright © 2012 OneBusAway. All Rights Reserved.