Uses of Interface
jakarta.persistence.criteria.CriteriaQuery
Packages that use CriteriaQuery
Package
Description
Defines the Jakarta Persistence Criteria Query API.
-
Uses of CriteriaQuery in jakarta.persistence.criteria
Methods in jakarta.persistence.criteria that return CriteriaQueryModifier and TypeMethodDescriptionCriteriaBuilder.createQuery()Create aCriteriaQueryobject.<T> CriteriaQuery<T> CriteriaBuilder.createQuery(Class<T> resultClass) Create aCriteriaQueryobject with the given result type.<T> CriteriaQuery<T> CriteriaBuilder.createQuery(Class<T> resultClass, String jpql) Create aCriteriaQueryobject representing the given Jakarta Persistence query languageSELECTquery with the given result type.CriteriaBuilder.createQuery(String jpql) Create aCriteriaQueryobject representing the given Jakarta Persistence query languageSELECTquery.CriteriaBuilder.createTupleQuery()Create aCriteriaQueryobject 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(BooleanExpression... restrictions) Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates.CriteriaQuery.having(Expression<Boolean> restriction) Specify a restriction over the groups of the query.CriteriaQuery.having(List<? extends Expression<Boolean>> restrictions) 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(Selection...)orCriteriaBuilder.tuple(Selection...)withCriteriaQuery.select(Selection)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(BooleanExpression... restrictions) Modify the query to restrict the query result according to the conjunction of the specified restriction predicates.CriteriaQuery.where(Expression<Boolean> restriction) Modify the query to restrict the query result according to the specified boolean expression.CriteriaQuery.where(List<? extends Expression<Boolean>> restrictions) Modify the query to restrict the query result according to the conjunction of the specified restriction predicates.Method parameters in jakarta.persistence.criteria with type arguments of type CriteriaQueryModifier and TypeMethodDescription<T> TypedQueryReference<T> CriteriaBuilder.augment(TypedQueryReference<T> reference, Consumer<CriteriaQuery<T>> augmentation) Modify the Jakarta Persistence query language query represented by the given reference, returning a reference to the modified query inheriting all the options of the given reference.
CriteriaBuilder.array(Selection...)orCriteriaBuilder.tuple(Selection...)withCriteriaQuery.select(Selection)is strongly preferred.