Class CompositeProjectionBinder
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.search.definition.binding.builtin.CompositeProjectionBinder
-
- All Implemented Interfaces:
ProjectionBinder
public final class CompositeProjectionBinder extends Object implements ProjectionBinder
Binds a constructor parameter to a composite projection, which will combine multiple inner projections.The content of the composite projection is defined in the constructor parameter type by another
ProjectionConstructor.On contrary to the
object projection, a composite projection is not bound to a specific object field, and thus it will always yield one and only one value.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(ProjectionBindingContext context)Binds a constructor parameter to a projection.static CompositeProjectionBindercreate()Creates anCompositeProjectionBinderto be passed toMethodParameterMappingStep.projection(ProjectionBinder).
-
-
-
Method Detail
-
create
public static CompositeProjectionBinder create()
Creates anCompositeProjectionBinderto be passed toMethodParameterMappingStep.projection(ProjectionBinder).- Returns:
- The binder.
-
bind
public void bind(ProjectionBindingContext context)
Description copied from interface:ProjectionBinderBinds a constructor parameter to a projection.The context passed in parameter provides various information about the constructor parameter being bound. Implementations are expected to take advantage of that information and to call one of the
definition*(...)methods on the context to set the projection.- Specified by:
bindin interfaceProjectionBinder- Parameters:
context- A context object providing information about the constructor parameter being bound, and expecting a call to one of itsdefinition*(...)methods.
-
-