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
Constructors Constructor Description PropertyBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoTypeModel<P> propertyTypeModel, IndexBindingContext indexBindingContext, PojoModelPropertyRootElement<P> bridgedElement, PojoPropertyIndexingDependencyConfigurationContextImpl<P> dependencyContext, Map<String,Object> params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<BoundPropertyBridge<P>>applyBinder(PropertyBinder binder)BeanResolverbeanResolver()<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.PojoModelPropertybridgedElement()PojoPropertyIndexingDependencyConfigurationContextdependencies()IndexSchemaElementindexSchemaElement()Objectparam(String name)Optional<Object>paramOptional(String name)IndexFieldTypeFactorytypeFactory()-
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
-
Methods inherited from interface org.hibernate.search.mapper.pojo.bridge.binding.PropertyBindingContext
bridge, bridge
-
-
-
-
Constructor Detail
-
PropertyBindingContextImpl
public PropertyBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoTypeModel<P> propertyTypeModel, IndexBindingContext indexBindingContext, PojoModelPropertyRootElement<P> bridgedElement, PojoPropertyIndexingDependencyConfigurationContextImpl<P> dependencyContext, Map<String,Object> params)
-
-
Method Detail
-
bridge
public <P2> void bridge(Class<P2> expectedPropertyType, PropertyBridge<P2> 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
public PojoModelProperty bridgedElement()
- Specified by:
bridgedElementin interfacePropertyBindingContext- Returns:
- An entry point allowing to declare expectations and retrieve accessors to the bridged POJO property.
-
dependencies
public PojoPropertyIndexingDependencyConfigurationContext 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
public IndexFieldTypeFactory typeFactory()
- Specified by:
typeFactoryin interfacePropertyBindingContext- Returns:
- An entry point allowing to define a new field type.
-
indexSchemaElement
public IndexSchemaElement indexSchemaElement()
- Specified by:
indexSchemaElementin interfacePropertyBindingContext- Returns:
- An entry point allowing to declare expectations and retrieve accessors to the index schema.
-
applyBinder
public Optional<BoundPropertyBridge<P>> applyBinder(PropertyBinder 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.
-
-