Interface ProjectionBindingMultiContext
-
- All Known Implementing Classes:
ProjectionBindingContextImpl.MultiContextImpl
@Incubating public interface ProjectionBindingMultiContext
The context returned byProjectionBindingContext.multi().- See Also:
ProjectionBindingContext.multi()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PojoModelValue<?>containerElement()<P> voiddefinition(Class<P> expectedValueType, BeanHolder<? extends ProjectionDefinition<? extends List<? extends P>>> definitionHolder)Binds the constructor parameter to the given multi-valued projection definition.<P> voiddefinition(Class<P> expectedValueType, ProjectionDefinition<? extends List<? extends P>> definition)Binds the constructor parameter to the given multi-valued projection definition.
-
-
-
Method Detail
-
definition
<P> void definition(Class<P> expectedValueType, ProjectionDefinition<? extends List<? extends P>> definition)
Binds the constructor parameter to the given multi-valued projection definition.- Type Parameters:
P- The type of values returned by the projection.- Parameters:
expectedValueType- The expected type of elements of the constructor parameter, which must be compatible with the element type of lists returned by the projection definition. Hibernate Search will check that these expectations are met, and throw an exception if they are not. Note this is not the type of the constructor parameter, but of its elements; i.e. for a constructor parameter of typeList<String>,expectedValueTypeshould be set toString.class.definition- A definition of the projection to bind to the constructor parameter.
-
definition
<P> void definition(Class<P> expectedValueType, BeanHolder<? extends ProjectionDefinition<? extends List<? extends P>>> definitionHolder)
Binds the constructor parameter to the given multi-valued projection definition.- Type Parameters:
P- The type of values returned by the projection.- Parameters:
expectedValueType- The expected type of elements of the constructor parameter, which must be compatible with the element type of lists returned by the projection definition. Hibernate Search will check that these expectations are met, and throw an exception if they are not. Note this is not the type of the constructor parameter, but of its elements; i.e. for a constructor parameter of typeList<String>,expectedValueTypeshould be set toString.class.definitionHolder- ABeanHoldercontaining the definition of the projection to bind to the constructor parameter.
-
containerElement
@Incubating PojoModelValue<?> containerElement()
- Returns:
- An entry point allowing to inspect the constructor parameter being bound to a projection.
-
-