Class DefaultIdentifierBindingContext<I>
java.lang.Object
org.hibernate.search.mapper.pojo.bridge.binding.impl.DefaultIdentifierBindingContext<I>
- All Implemented Interfaces:
BindingContext,IdentifierBindingContext<I>
public class DefaultIdentifierBindingContext<I>
extends Object
implements IdentifierBindingContext<I>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultIdentifierBindingContext(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, Optional<IndexedEntityBindingContext> indexedEntityBindingContext, PojoTypeModel<I> valueTypeModel, Map<String, Object> params) -
Method Summary
Modifier and TypeMethodDescriptionapplyBinder(IdentifierBinder binder) <I2> voidbridge(Class<I2> expectedValueType, BeanHolder<? extends IdentifierBridge<I2>> bridgeHolder) Sets the bridge implementing the value/index binding.<I2> voidbridge(Class<I2> expectedValueType, IdentifierBridge<I2> bridge) Sets the bridge implementing the value/index binding.params()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.mapper.pojo.bridge.binding.BindingContext
beanResolver, param, param, paramOptional, paramOptional, params
-
Constructor Details
-
DefaultIdentifierBindingContext
public DefaultIdentifierBindingContext(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, Optional<IndexedEntityBindingContext> indexedEntityBindingContext, PojoTypeModel<I> valueTypeModel, Map<String, Object> params)
-
-
Method Details
-
bridge
Description copied from interface:IdentifierBindingContextSets the bridge implementing the value/index binding.- Specified by:
bridgein interfaceIdentifierBindingContext<I>- Type Parameters:
I2- The type of identifiers expected by the given bridge.- Parameters:
expectedValueType- The type of identifiers expected by the given bridge. Hibernate Search will check that these expectations are met, and throw an exception if they are not.bridge- The bridge to use at runtime to convert between the POJO identifier and the document identifier.
-
bridge
public <I2> void bridge(Class<I2> expectedValueType, BeanHolder<? extends IdentifierBridge<I2>> bridgeHolder) Description copied from interface:IdentifierBindingContextSets the bridge implementing the value/index binding.- Specified by:
bridgein interfaceIdentifierBindingContext<I>- Type Parameters:
I2- The type of identifiers expected by the given bridge.- Parameters:
expectedValueType- The type of values expected by the given bridge. Hibernate Search will check that these expectations are met, and throw an exception if they are not.bridgeHolder- ABeanHoldercontaining the bridge to use at runtime to convert between the POJO property value and the index field value. UseBeanHolder.of(Object)if you don't need any particular closing behavior.
-
bridgedElement
- Specified by:
bridgedElementin interfaceIdentifierBindingContext<I>- Returns:
- An entry point allowing to inspect the type of values that will be passed to this bridge.
-
applyBinder
-
beanResolver
- Specified by:
beanResolverin interfaceBindingContext- Returns:
- A bean provider, allowing the retrieval of beans, including CDI/Spring DI beans when in the appropriate environment.
-
params
- Specified by:
paramsin interfaceBindingContext- Returns:
- Parameters defined for the binder.
- See Also:
-