Interface CompositeProjectionValueStep<N extends CompositeProjectionOptionsStep<?,T>,T>

Type Parameters:
N - The next step if a method other than multi() is called, i.e. the return type of methods defined in CompositeProjectionOptionsStep when called directly on this object.
T - The type of composed projections.
All Superinterfaces:
CompositeProjectionOptionsStep<N,T>, ProjectionFinalStep<T>

public interface CompositeProjectionValueStep<N extends CompositeProjectionOptionsStep<?,T>,T> extends CompositeProjectionOptionsStep<N,T>
The step in a composite projection definition where the projection (optionally) can be marked as multi-valued (returning Lists), and where optional parameters can be set.

By default (if multi() is not called), the projection is single-valued.

  • Method Details

    • multi

      Defines the projection as multi-valued, i.e. returning List<T> instead of T.

      Calling multi() is mandatory for object projections on multi-valued object fields, otherwise the projection will throw an exception upon creating the search query.

      Calling multi() on basic composite projections is generally not useful: the only effect is that projected values will be wrapped in a one-element List.

      A new step to define optional parameters for the projection.