Class AlternativeBinderImpl<D,P>
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.bridge.builtin.alternative.impl.AlternativeBinderImpl<D,P>
-
- All Implemented Interfaces:
AlternativeBinder,TypeBinder
public final class AlternativeBinderImpl<D,P> extends Object implements AlternativeBinder
-
-
Constructor Summary
Constructors Constructor Description AlternativeBinderImpl(Class<D> discriminatorType, String fieldValueSourcePropertyName, Class<P> fieldValueSourcePropertyType, BeanReference<? extends AlternativeBinderDelegate<D,P>> delegateRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlternativeBinderalternativeId(String id)voidbind(TypeBindingContext context)Binds a type to index fields.
-
-
-
Constructor Detail
-
AlternativeBinderImpl
public AlternativeBinderImpl(Class<D> discriminatorType, String fieldValueSourcePropertyName, Class<P> fieldValueSourcePropertyType, BeanReference<? extends AlternativeBinderDelegate<D,P>> delegateRef)
-
-
Method Detail
-
alternativeId
public AlternativeBinder alternativeId(String id)
- Specified by:
alternativeIdin interfaceAlternativeBinder- Parameters:
id- The identifier of the alternative. This is used to differentiate between multiple alternative discriminators:assign an id when building each discriminator marker, then select the same id here.- Returns:
this, for method chaining.
-
bind
public void bind(TypeBindingContext context)
Description copied from interface:TypeBinderBinds a type to index fields.The context passed in parameter provides various information about the type being bound. Implementations are expected to take advantage of that information and to call one of the
bridge(...)methods on the context to set the bridge.Implementations are also expected to declare dependencies, i.e. the properties that will later be used in the
TypeBridge.write(DocumentElement, Object, TypeBridgeWriteContext)method, usingTypeBindingContext.dependencies(). Failing that, Hibernate Search will not reindex entities properly when an indexed property is modified.- Specified by:
bindin interfaceTypeBinder- Parameters:
context- A context object providing information about the type being bound, and expecting a call to one of itsbridge(...)methods.
-
-