Interface ValueBindingContext<V>
- Type Parameters:
V
- The type of values on the POJO side of the bridge.
- All Superinterfaces:
BindingContext
The context provided to the
ValueBinder.bind(ValueBindingContext)
method.-
Method Summary
Modifier and TypeMethodDescription<V2,
F> void bridge
(Class<V2> expectedValueType, BeanHolder<? extends ValueBridge<V2, F>> bridgeHolder, IndexFieldTypeOptionsStep<?, F> fieldTypeOptionsStep) Sets the bridge implementing the value/index binding.<V2,
F> void bridge
(Class<V2> expectedValueType, ValueBridge<V2, F> bridge) Sets the bridge implementing the value/index binding.<V2,
F> void bridge
(Class<V2> expectedValueType, ValueBridge<V2, F> bridge, IndexFieldTypeOptionsStep<?, F> fieldTypeOptionsStep) Sets the bridge implementing the value/index binding.Methods inherited from interface org.hibernate.search.mapper.pojo.bridge.binding.BindingContext
beanResolver, param, param, paramOptional, paramOptional
-
Method Details
-
bridge
Sets the bridge implementing the value/index binding.- Type Parameters:
V2
- The type of values expected by the given bridge.F
- The type of index field values, on the index side of the 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.bridge
- The bridge to use at runtime to convert between the POJO property value and the index field value.
-
bridge
<V2,F> void bridge(Class<V2> expectedValueType, ValueBridge<V2, F> bridge, IndexFieldTypeOptionsStep<?, F> fieldTypeOptionsStep) Sets the bridge implementing the value/index binding.- Type Parameters:
V2
- The type of values expected by the given bridge.F
- The type of index field values, on the index side of the 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.bridge
- The bridge to use at runtime to convert between the POJO property value and the index field value.fieldTypeOptionsStep
- The result of callingcontext.getTypeFactory()
and setting the expectations regarding the index field type (for instancereturn context.getTypeFactory().asString()
).null
to let Hibernate Search derive the expectations from theValueBridge
's generic type parameters.Note the
DSL converter
andprojection converter
will be ignored, since they are already implemented by the value bridge itself through itsValueBridge.toIndexedValue(Object, ValueBridgeToIndexedValueContext)
andValueBridge.fromIndexedValue(Object, ValueBridgeFromIndexedValueContext)
methods.
-
bridge
<V2,F> void bridge(Class<V2> expectedValueType, BeanHolder<? extends ValueBridge<V2, F>> bridgeHolder, IndexFieldTypeOptionsStep<?, F> fieldTypeOptionsStep) Sets the bridge implementing the value/index binding.- Type Parameters:
V2
- The type of values expected by the given bridge.F
- The type of index field values, on the index side of the 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
- ABeanHolder
containing 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.fieldTypeOptionsStep
- The result of callingcontext.getTypeFactory()
and setting the expectations regarding the index field type (for instancereturn context.getTypeFactory().asString()
).null
to let Hibernate Search derive the expectations from theValueBridge
's generic type parameters.Note the
DSL converter
andprojection converter
will be ignored, since they are already implemented by the value bridge itself through itsValueBridge.toIndexedValue(Object, ValueBridgeToIndexedValueContext)
andValueBridge.fromIndexedValue(Object, ValueBridgeFromIndexedValueContext)
methods.
-
bridgedElement
- Returns:
- An entry point allowing to inspect the type of values that will be passed to this bridge.
-
typeFactory
IndexFieldTypeFactory typeFactory()- Returns:
- An entry point allowing to define a new field type.
-