Interface ProjectionBindingMultiContext


@Incubating public interface ProjectionBindingMultiContext
The context returned by ProjectionBindingContext.multi().
See Also:
  • 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 type List<String>, expectedValueType should be set to String.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 type List<String>, expectedValueType should be set to String.class.
      definitionHolder - A BeanHolder containing 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.