Uses of Interface
jakarta.persistence.criteria.CriteriaQuery
Package
Description
Jakarta Persistence is the API for the management for persistence and object/relational mapping.
Jakarta Persistence Criteria API
-
Uses of CriteriaQuery in jakarta.persistence
Modifier and TypeMethodDescription<T> TypedQuery<T>
EntityManager.createQuery
(CriteriaQuery<T> criteriaQuery) Create an instance ofTypedQuery
for executing a criteria query. -
Uses of CriteriaQuery in jakarta.persistence.criteria
Modifier and TypeMethodDescriptionCriteriaBuilder.createQuery()
Create aCriteriaQuery
object.<T> CriteriaQuery<T>
CriteriaBuilder.createQuery
(Class<T> resultClass) Create aCriteriaQuery
object with the given result type.CriteriaBuilder.createTupleQuery()
Create aCriteriaQuery
object that returns a tuple of objects as its result.CriteriaQuery.distinct
(boolean distinct) Specify whether duplicate query results are eliminated.CriteriaQuery.groupBy
(Expression<?>... grouping) Specify the expressions that are used to form groups over the query results.CriteriaQuery.groupBy
(List<Expression<?>> grouping) Specify the expressions that are used to form groups over the query results.CriteriaQuery.having
(Expression<Boolean> restriction) Specify a restriction over the groups of the query.Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates.Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates.CriteriaQuery.multiselect
(Selection<?>... selections) Deprecated.CriteriaQuery.multiselect
(List<Selection<?>> selectionList) Deprecated.Since this method is not typesafe, the use ofCriteriaBuilder.array(jakarta.persistence.criteria.Selection<?>...)
orCriteriaBuilder.tuple(jakarta.persistence.criteria.Selection<?>...)
withselect(jakarta.persistence.criteria.Selection<? extends T>)
is strongly preferred.Specify the ordering expressions that are used to order the query results.Specify the ordering expressions that are used to order the query results.Specify the item that is to be returned in the query result.CriteriaQuery.where
(Expression<Boolean> restriction) Modify the query to restrict the query result according to the specified boolean expression.Modify the query to restrict the query result according to the conjunction of the specified restriction predicates.Modify the query to restrict the query result according to the conjunction of the specified restriction predicates.
CriteriaBuilder.array(jakarta.persistence.criteria.Selection<?>...)
orCriteriaBuilder.tuple(jakarta.persistence.criteria.Selection<?>...)
withselect(jakarta.persistence.criteria.Selection<? extends T>)
is strongly preferred.