Class RoutingBindingContextImpl<E>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.bridge.binding.impl.AbstractCompositeBindingContext
-
- org.hibernate.search.mapper.pojo.bridge.binding.impl.RoutingBindingContextImpl<E>
-
- All Implemented Interfaces:
BindingContext,RoutingBindingContext
public class RoutingBindingContextImpl<E> extends AbstractCompositeBindingContext implements RoutingBindingContext
-
-
Constructor Summary
Constructors Constructor Description RoutingBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoRawTypeModel<E> indexedEntityType, PojoModelTypeRootElement<E> pojoModelTypeRootElement, PojoRoutingIndexingDependencyConfigurationContextImpl<E> dependencyContext, Map<String,Object> params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundRoutingBridge<E>applyBinder(RoutingBinder binder)BeanResolverbeanResolver()<E2> voidbridge(Class<E2> expectedType, BeanHolder<? extends RoutingBridge<E2>> bridgeHolder)Sets the object responsible for routing indexed entities to the correct index/shard.<E2> voidbridge(Class<E2> expectedType, RoutingBridge<E2> bridge)Sets the object responsible for routing indexed entities to the correct index/shard.PojoModelTypebridgedElement()PojoRoutingIndexingDependencyConfigurationContextdependencies()Objectparam(String name)Optional<Object>paramOptional(String name)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.mapper.pojo.bridge.binding.BindingContext
beanResolver, param, paramOptional
-
-
-
-
Constructor Detail
-
RoutingBindingContextImpl
public RoutingBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoRawTypeModel<E> indexedEntityType, PojoModelTypeRootElement<E> pojoModelTypeRootElement, PojoRoutingIndexingDependencyConfigurationContextImpl<E> dependencyContext, Map<String,Object> params)
-
-
Method Detail
-
bridge
public <E2> void bridge(Class<E2> expectedType, RoutingBridge<E2> bridge)
Description copied from interface:RoutingBindingContextSets the object responsible for routing indexed entities to the correct index/shard.- Specified by:
bridgein interfaceRoutingBindingContext- Type Parameters:
E2- The expected entity type.- Parameters:
expectedType- The expected entity type.bridge- The bridge to use when indexing.
-
bridge
public <E2> void bridge(Class<E2> expectedType, BeanHolder<? extends RoutingBridge<E2>> bridgeHolder)
Description copied from interface:RoutingBindingContextSets the object responsible for routing indexed entities to the correct index/shard.- Specified by:
bridgein interfaceRoutingBindingContext- Type Parameters:
E2- The expected entity type.- Parameters:
expectedType- The expected entity type.bridgeHolder- ABeanHoldercontaining the bridge to use when indexing.
-
bridgedElement
public PojoModelType bridgedElement()
- Specified by:
bridgedElementin interfaceRoutingBindingContext- Returns:
- An entry point allowing to declare expectations and retrieve accessors to the bridged POJO type (i.e. the indexed type).
-
dependencies
public PojoRoutingIndexingDependencyConfigurationContext dependencies()
- Specified by:
dependenciesin interfaceRoutingBindingContext- Returns:
- An entry point allowing to declare the parts of the entity graph that the bridge will depend on.
-
applyBinder
public BoundRoutingBridge<E> applyBinder(RoutingBinder binder)
-
beanResolver
public BeanResolver beanResolver()
- Specified by:
beanResolverin interfaceBindingContext- Returns:
- A bean provider, allowing the retrieval of beans, including CDI/Spring DI beans when in the appropriate environment.
-
param
public Object param(String name)
- Specified by:
paramin interfaceBindingContext- Parameters:
name- The name of the param- Returns:
- Get a param defined for the binder by the given name
-
paramOptional
public Optional<Object> paramOptional(String name)
- Specified by:
paramOptionalin interfaceBindingContext- Parameters:
name- The name of the param- Returns:
- Get an optional param defined for the binder by the given name, a param having such name may either exist or not.
-
-