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.
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 TypeMethodDescriptionList<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 queryquery- result query being assembledcb- criteria builder for creating expressions- Returns:
- selections to project into the tuple result
-