Class PropertyBindingContextImpl<P>
java.lang.Object
org.hibernate.search.mapper.pojo.bridge.binding.impl.AbstractCompositeBindingContext
org.hibernate.search.mapper.pojo.bridge.binding.impl.PropertyBindingContextImpl<P>
- All Implemented Interfaces:
BindingContext,PropertyBindingContext
public class PropertyBindingContextImpl<P>
extends AbstractCompositeBindingContext
implements PropertyBindingContext
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoTypeModel<P> propertyTypeModel, IndexBindingContext indexBindingContext, PojoModelPropertyRootElement<P> bridgedElement, PojoPropertyIndexingDependencyConfigurationContextImpl<P> dependencyContext, Map<String, Object> params) -
Method Summary
Modifier and TypeMethodDescriptionapplyBinder(PropertyBinder binder) <P2> voidbridge(Class<P2> expectedPropertyType, BeanHolder<? extends PropertyBridge<P2>> bridgeHolder) Sets the bridge implementing the property/index binding.<P2> voidbridge(Class<P2> expectedPropertyType, PropertyBridge<P2> bridge) Sets the bridge implementing the property/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, paramsMethods inherited from interface org.hibernate.search.mapper.pojo.bridge.binding.PropertyBindingContext
bridge, bridge
-
Constructor Details
-
PropertyBindingContextImpl
public PropertyBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoTypeModel<P> propertyTypeModel, IndexBindingContext indexBindingContext, PojoModelPropertyRootElement<P> bridgedElement, PojoPropertyIndexingDependencyConfigurationContextImpl<P> dependencyContext, Map<String, Object> params)
-
-
Method Details
-
bridge
Description copied from interface:PropertyBindingContextSets the bridge implementing the property/index binding.- Specified by:
bridgein interfacePropertyBindingContext- Type Parameters:
P2- The type of the property expected by the given bridge.- Parameters:
expectedPropertyType- The type of the property 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 and the index field value.
-
bridge
public <P2> void bridge(Class<P2> expectedPropertyType, BeanHolder<? extends PropertyBridge<P2>> bridgeHolder) Description copied from interface:PropertyBindingContextSets the bridge implementing the property/index binding.- Specified by:
bridgein interfacePropertyBindingContext- Type Parameters:
P2- The type of the property expected by the given bridge.- Parameters:
expectedPropertyType- The type of the property 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 and the index field value. UseBeanHolder.of(Object)if you don't need any particular closing behavior.
-
bridgedElement
- Specified by:
bridgedElementin interfacePropertyBindingContext- Returns:
- An entry point allowing to declare expectations and retrieve accessors to the bridged POJO property.
-
dependencies
- Specified by:
dependenciesin interfacePropertyBindingContext- Returns:
- An entry point allowing to declare the parts of the entity graph that this bridge will depend on.
-
typeFactory
- Specified by:
typeFactoryin interfacePropertyBindingContext- Returns:
- An entry point allowing to define a new field type.
-
indexSchemaElement
- Specified by:
indexSchemaElementin interfacePropertyBindingContext- Returns:
- An entry point allowing to declare expectations and retrieve accessors to the index schema.
-
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:
-