Interface ProjectionBindingMultiContext
The context returned by
ProjectionBindingContext.multi()
.- See Also:
-
Method Summary
Modifier and TypeMethodDescription<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.<P> void
definition
(Class<P> expectedValueType, ProjectionDefinition<? extends List<? extends P>> definition) Binds the constructor parameter to the given multi-valued projection definition.
-
Method Details
-
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>
,expectedValueType
should 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>
,expectedValueType
should be set toString.class
.definitionHolder
- ABeanHolder
containing the definition of the projection to bind to the constructor parameter.
-
containerElement
- Returns:
- An entry point allowing to inspect the constructor parameter being bound to a projection.
-