Class ProjectionBindingContextImpl.MultiContextImpl<PV>

java.lang.Object
org.hibernate.search.mapper.pojo.search.definition.binding.impl.ProjectionBindingContextImpl.MultiContextImpl<PV>
All Implemented Interfaces:
ProjectionBindingMultiContext
Enclosing class:
ProjectionBindingContextImpl<P>

public class ProjectionBindingContextImpl.MultiContextImpl<PV> extends Object implements ProjectionBindingMultiContext
  • Field Details

    • parameterContainerElementTypeModel

      public final PojoTypeModel<PV> parameterContainerElementTypeModel
  • Constructor Details

    • MultiContextImpl

      public MultiContextImpl(PojoTypeModel<PV> parameterContainerElementTypeModel)
  • Method Details

    • definition

      public <P2> void definition(Class<P2> expectedValueType, ProjectionDefinition<? extends List<? extends P2>> definition)
      Description copied from interface: ProjectionBindingMultiContext
      Binds the constructor parameter to the given multi-valued projection definition.
      Specified by:
      definition in interface ProjectionBindingMultiContext
      Type Parameters:
      P2 - 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

      public <P2> void definition(Class<P2> expectedValueType, BeanHolder<? extends ProjectionDefinition<? extends List<? extends P2>>> definitionHolder)
      Description copied from interface: ProjectionBindingMultiContext
      Binds the constructor parameter to the given multi-valued projection definition.
      Specified by:
      definition in interface ProjectionBindingMultiContext
      Type Parameters:
      P2 - 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

      public PojoModelValue<?> containerElement()
      Specified by:
      containerElement in interface ProjectionBindingMultiContext
      Returns:
      An entry point allowing to inspect the constructor parameter being bound to a projection.