Class TypeBindingContextImpl<T>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.bridge.binding.impl.AbstractCompositeBindingContext
-
- org.hibernate.search.mapper.pojo.bridge.binding.impl.TypeBindingContextImpl<T>
-
- All Implemented Interfaces:
BindingContext,TypeBindingContext
public class TypeBindingContextImpl<T> extends AbstractCompositeBindingContext implements TypeBindingContext
-
-
Constructor Summary
Constructors Constructor Description TypeBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoTypeModel<T> typeModel, IndexBindingContext indexBindingContext, PojoModelTypeRootElement<T> bridgedElement, PojoTypeIndexingDependencyConfigurationContextImpl<T> dependencyContext, Map<String,Object> params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<BoundTypeBridge<T>>applyBinder(TypeBinder binder)BeanResolverbeanResolver()<T2> voidbridge(Class<T2> expectedEntityType, BeanHolder<? extends TypeBridge<T2>> bridgeHolder)Sets the bridge implementing the type/index binding.<T2> voidbridge(Class<T2> expectedEntityType, TypeBridge<T2> bridge)Sets the bridge implementing the type/index binding.PojoModelTypebridgedElement()PojoTypeIndexingDependencyConfigurationContextdependencies()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.TypeBindingContext
bridge, bridge
-
-
-
-
Constructor Detail
-
TypeBindingContextImpl
public TypeBindingContextImpl(BeanResolver beanResolver, PojoBootstrapIntrospector introspector, PojoTypeModel<T> typeModel, IndexBindingContext indexBindingContext, PojoModelTypeRootElement<T> bridgedElement, PojoTypeIndexingDependencyConfigurationContextImpl<T> dependencyContext, Map<String,Object> params)
-
-
Method Detail
-
bridge
public <T2> void bridge(Class<T2> expectedEntityType, TypeBridge<T2> bridge)
Description copied from interface:TypeBindingContextSets the bridge implementing the type/index binding.- Specified by:
bridgein interfaceTypeBindingContext- Type Parameters:
T2- The type of bridged elements expected by the given bridge.- Parameters:
expectedEntityType- The type of the entity expected by the given bridge.bridge- The bridge to use at runtime to convert between the type and the index field value.
-
bridge
public <T2> void bridge(Class<T2> expectedEntityType, BeanHolder<? extends TypeBridge<T2>> bridgeHolder)
Description copied from interface:TypeBindingContextSets the bridge implementing the type/index binding.- Specified by:
bridgein interfaceTypeBindingContext- Type Parameters:
T2- The type of bridged elements expected by the given bridge.- Parameters:
expectedEntityType- The type of the entity expected by the given bridge.bridgeHolder- ABeanHoldercontaining the bridge to use at runtime to convert between the type and the index field value. UseBeanHolder.of(Object)if you don't need any particular closing behavior.
-
bridgedElement
public PojoModelType bridgedElement()
- Specified by:
bridgedElementin interfaceTypeBindingContext- Returns:
- An entry point allowing to declare expectations and retrieve accessors to the bridged POJO type.
-
dependencies
public PojoTypeIndexingDependencyConfigurationContext dependencies()
- Specified by:
dependenciesin interfaceTypeBindingContext- 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 interfaceTypeBindingContext- Returns:
- An entry point allowing to define a new field type.
-
indexSchemaElement
public IndexSchemaElement indexSchemaElement()
- Specified by:
indexSchemaElementin interfaceTypeBindingContext- Returns:
- An entry point allowing to declare expectations and retrieve accessors to the index schema.
-
applyBinder
public Optional<BoundTypeBridge<T>> applyBinder(TypeBinder 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.
-
-