Interface FieldProjectionValueStep<N extends FieldProjectionOptionsStep<?,​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 FieldProjectionOptionsStep when called directly on this object.
    T - The type of projected field values.
    All Superinterfaces:
    FieldProjectionOptionsStep<N,​T>, ProjectionFinalStep<T>

    public interface FieldProjectionValueStep<N extends FieldProjectionOptionsStep<?,​T>,​T>
    extends FieldProjectionOptionsStep<N,​T>
    The initial step in a "field" 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 considered single-valued, and its creation will fail if the field is multi-valued.

    • Method Detail

      • multi

        FieldProjectionOptionsStep<?,​List<T>> multi()
        Defines the projection as multi-valued, i.e. returning List<T> instead of T.

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

        Returns:
        A new step to define optional parameters for the multi-valued projections.