Class ProjectionBindingContextImpl.MultiContextImpl<PV>

    • Field Detail

      • parameterContainerElementTypeModel

        public final PojoTypeModel<PV> parameterContainerElementTypeModel
    • Constructor Detail

      • MultiContextImpl

        public MultiContextImpl​(PojoTypeModel<PV> parameterContainerElementTypeModel)
    • Method Detail

      • 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.