org.onebusaway.transit_data_federation.bundle.tasks
Class EntityReplacementStrategyImpl

java.lang.Object
  extended by org.onebusaway.transit_data_federation.bundle.tasks.EntityReplacementStrategyImpl
All Implemented Interfaces:
EntityReplacementStrategy

public class EntityReplacementStrategyImpl
extends Object
implements EntityReplacementStrategy

EntityReplacementStrategy implementation that is used to map entity ids for a particular type.

Author:
bdferris
See Also:
EntityReplacementStrategy, EntityReplacementStrategyFactory

Constructor Summary
EntityReplacementStrategyImpl()
           
 
Method Summary
 void addEntityReplacement(Class<?> entityType, Serializable entityId, Serializable replacementEntityId)
           
 Serializable getReplacementEntityId(Class<?> entityType, Serializable entityId)
           
 boolean hasReplacementEntities(Class<?> entityType)
           
 boolean hasReplacementEntity(Class<?> entityType, Serializable entityId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityReplacementStrategyImpl

public EntityReplacementStrategyImpl()
Method Detail

addEntityReplacement

public void addEntityReplacement(Class<?> entityType,
                                 Serializable entityId,
                                 Serializable replacementEntityId)

hasReplacementEntities

public boolean hasReplacementEntities(Class<?> entityType)
Specified by:
hasReplacementEntities in interface EntityReplacementStrategy
Returns:
true if there are any entity replacements for classes of the specified type

hasReplacementEntity

public boolean hasReplacementEntity(Class<?> entityType,
                                    Serializable entityId)
Specified by:
hasReplacementEntity in interface EntityReplacementStrategy
Returns:
true if there is an entity replacement for a entity with the specified type and id

getReplacementEntityId

public Serializable getReplacementEntityId(Class<?> entityType,
                                           Serializable entityId)
Specified by:
getReplacementEntityId in interface EntityReplacementStrategy
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.