Interface SelectionsProvider<T>

Type Parameters:
T - entity type backing the repository
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SelectionsProvider<T>
Callback for defining tuple selections for a WebQueryRepository query.

The provided query may be used to create correlated subqueries or inspect outer-query state. Callers should avoid mutating the outer query in ways that change row cardinality, such as enabling distinct results or adding grouping, because paged execution derives the total count from a separate count query.

  • Method Summary

    Modifier and Type
    Method
    Description
    List<jakarta.persistence.criteria.Selection<?>>
    getSelections(jakarta.persistence.criteria.Root<T> root, jakarta.persistence.criteria.CriteriaQuery<?> query, jakarta.persistence.criteria.CriteriaBuilder cb)
    Defines the tuple selections to apply to the result query.
  • Method Details

    • getSelections

      List<jakarta.persistence.criteria.Selection<?>> getSelections(jakarta.persistence.criteria.Root<T> root, jakarta.persistence.criteria.CriteriaQuery<?> query, jakarta.persistence.criteria.CriteriaBuilder cb)
      Defines the tuple selections to apply to the result query.
      Parameters:
      root - entity root for the result query
      query - result query being assembled
      cb - criteria builder for creating expressions
      Returns:
      selections to project into the tuple result