V - The type of values on the POJO side of the bridge.public interface ValueBindingContext<V> extends BindingContext
ValueBinder.bind(ValueBindingContext) method.| Modifier and Type | Method and Description |
|---|---|
PojoModelValue<V> |
getBridgedElement() |
IndexFieldTypeFactory |
getTypeFactory() |
<V2,F> void |
setBridge(Class<V2> expectedValueType,
BeanHolder<? extends ValueBridge<V2,F>> bridgeHolder,
IndexFieldTypeOptionsStep<?,F> fieldTypeOptionsStep)
Sets the bridge implementing the value/index binding.
|
<V2,F> void |
setBridge(Class<V2> expectedValueType,
ValueBridge<V2,F> bridge)
Sets the bridge implementing the value/index binding.
|
<V2,F> void |
setBridge(Class<V2> expectedValueType,
ValueBridge<V2,F> bridge,
IndexFieldTypeOptionsStep<?,F> fieldTypeOptionsStep)
Sets the bridge implementing the value/index binding.
|
getBeanResolver<V2,F> void setBridge(Class<V2> expectedValueType, ValueBridge<V2,F> bridge)
V2 - The type of values expected by the given bridge.F - The type of index field values, on the index side of the bridge.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.<V2,F> void setBridge(Class<V2> expectedValueType, ValueBridge<V2,F> bridge, IndexFieldTypeOptionsStep<?,F> fieldTypeOptionsStep)
V2 - The type of values expected by the given bridge.F - The type of index field values, on the index side of the bridge.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 calling context.getTypeFactory()
and setting the expectations regarding the index field type
(for instance return context.getTypeFactory().asString()).
null to let Hibernate Search derive the expectations
from the ValueBridge's generic type parameters.
Note the DSL converter
and projection converter
will be ignored, since they are already implemented by the value bridge itself
through its ValueBridge.toIndexedValue(Object, ValueBridgeToIndexedValueContext)
and ValueBridge.fromIndexedValue(Object, ValueBridgeFromIndexedValueContext) methods.
<V2,F> void setBridge(Class<V2> expectedValueType, BeanHolder<? extends ValueBridge<V2,F>> bridgeHolder, IndexFieldTypeOptionsStep<?,F> fieldTypeOptionsStep)
V2 - The type of values expected by the given bridge.F - The type of index field values, on the index side of the bridge.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 - A BeanHolder containing
the bridge to use at runtime to convert between the POJO property value and the index field value.
Use BeanHolder.of(Object) if you don't need any particular closing behavior.fieldTypeOptionsStep - The result of calling context.getTypeFactory()
and setting the expectations regarding the index field type
(for instance return context.getTypeFactory().asString()).
null to let Hibernate Search derive the expectations
from the ValueBridge's generic type parameters.
Note the DSL converter
and projection converter
will be ignored, since they are already implemented by the value bridge itself
through its ValueBridge.toIndexedValue(Object, ValueBridgeToIndexedValueContext)
and ValueBridge.fromIndexedValue(Object, ValueBridgeFromIndexedValueContext) methods.
@Incubating PojoModelValue<V> getBridgedElement()
IndexFieldTypeFactory getTypeFactory()
Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.