CriteriaQuery
| Modifier and Type | Method and Description |
|---|---|
| public JpaCriteriaQuery | createCountQuery()
Wraps this query in a subquery and returns a count query based on that subquery in the from clause. |
| public JpaCriteriaQuery | distinct(boolean
boolean value specifying whether duplicate
results must be eliminated from the query result or
whether they must be retained distinct)Redeclares jakarta. |
| public JpaCriteriaQuery | |
| public JpaCriteriaQuery | |
| public JpaCriteriaQuery | |
| public JpaCriteriaQuery | |
| public <X> JpaRoot | from(Class<X>
the entity class entityClass)Redeclares jakarta. |
| public <X> JpaRoot | from(EntityType<X>
metamodel entity representing the entity
of type X entity)Redeclares jakarta. |
| public JpaExpression | |
| public FetchClauseType | |
| public JpaExpression | |
| public default List | getOrderList()
Implements jakarta. |
| public Set | getParameters()
Redeclares jakarta. |
| public List | |
| public JpaCriteriaQuery | groupBy(Expression<?>...
zero or more grouping expressions grouping)Redeclares jakarta. |
| public JpaCriteriaQuery | groupBy(List<Expression<?>>
list of zero or more grouping expressions grouping)Redeclares jakarta. |
| public JpaCriteriaQuery | having(Expression<Boolean>
a simple or compound boolean expression restriction)Redeclares jakarta. |
| public JpaCriteriaQuery | having(Predicate...
zero or more restriction predicates restrictions)Redeclares jakarta. |
| public JpaCriteriaQuery | multiselect(Selection<?>...
selection items corresponding to the
results to be returned by the query selections)Redeclares jakarta. |
| public JpaCriteriaQuery | multiselect(List<Selection<?>>
list of selection items corresponding
to the results to be returned by the query selectionList)Redeclares jakarta. |
| public JpaCriteriaQuery | |
| public JpaCriteriaQuery | |
| public JpaCriteriaQuery | orderBy(Order...
zero or more ordering expressions o)Redeclares jakarta. |
| public JpaCriteriaQuery | orderBy(List<Order>
list of zero or more ordering expressions o)Redeclares jakarta. |
| public JpaCriteriaQuery | select(Selection<? extends T>
selection specifying the item that
is to be returned in the query result selection)Redeclares jakarta. |
| public JpaCriteriaQuery | where(Expression<Boolean>
a simple or compound boolean expression restriction)Redeclares jakarta. |
| public JpaCriteriaQuery | where(Predicate...
zero or more restriction predicates restrictions)Redeclares jakarta. |
| createCountQuery | back to summary |
|---|---|
| public JpaCriteriaQuery Wraps this query in a subquery and returns a count query based on that subquery in the from clause.
| |
| distinct | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify whether duplicate query results will be eliminated.
A true value will cause duplicates to be eliminated.
A false value will cause duplicates to be retained.
If distinct has not been specified, duplicate results must
be retained.
This method only overrides the return type of the
corresponding
| |
| fetch | back to summary |
|---|---|
| public JpaCriteriaQuery | |
| fetch | back to summary |
|---|---|
| public JpaCriteriaQuery | |
| fetch | back to summary |
|---|---|
| public JpaCriteriaQuery | |
| fetch | back to summary |
|---|---|
| public JpaCriteriaQuery | |
| from | back to summary |
|---|---|
| public <X> JpaRoot Redeclares jakarta. Doc from jakarta. Create and add a query root corresponding to the given entity, forming a cartesian product with any existing roots. | |
| from | back to summary |
|---|---|
| public <X> JpaRoot Redeclares jakarta. Doc from jakarta. Create and add a query root corresponding to the given entity, forming a cartesian product with any existing roots.
| |
| getFetch | back to summary |
|---|---|
| public JpaExpression | |
| getFetchClauseType | back to summary |
|---|---|
| public FetchClauseType getFetchClauseType() | |
| getOffset | back to summary |
|---|---|
| public JpaExpression | |
| getOrderList | back to summary |
|---|---|
| public default List Implements jakarta. Doc from jakarta. Return the ordering expressions in order of precedence. Returns empty list if no ordering expressions have been specified. Modifications to the list do not affect the query.
| |
| getParameters | back to summary |
|---|---|
| public Set Redeclares jakarta. Doc from jakarta. Return the parameters of the query. Returns empty set if there are no parameters. Modifications to the set do not affect the query. API Note Warning! This actually walks the criteria tree looking for parameters nodes.
| |
| getRootList | back to summary |
|---|---|
| public List Return the roots as a list. | |
| groupBy | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify the expressions that are used to form groups over
the query results.
Replaces the previous specified grouping expressions, if any.
If no grouping expressions are specified, any previously
added grouping expressions are simply removed.
This method only overrides the return type of the
corresponding
| |
| groupBy | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify the expressions that are used to form groups over
the query results.
Replaces the previous specified grouping expressions, if any.
If no grouping expressions are specified, any previously
added grouping expressions are simply removed.
This method only overrides the return type of the
corresponding
| |
| having | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify a restriction over the groups of the query.
Replaces the previous having restriction(s), if any.
This method only overrides the return type of the
corresponding
| |
| having | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify restrictions over the groups of the query
according the conjunction of the specified restriction
predicates.
Replaces the previously added having restriction(s), if any.
If no restrictions are specified, any previously added
restrictions are simply removed.
This method only overrides the return type of the
corresponding
| |
| multiselect | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify the selection items that are to be returned in the query result. Replaces the previously specified selection(s), if any. The type of the result of the query execution depends on the specification of the type of the criteria query object created as well as the arguments to the multiselect method. An argument to the multiselect method must not be a tuple- or array-valued compound selection item. The semantics of this method are as follows:
| |
| multiselect | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify the selection items that are to be returned in the query result. Replaces the previously specified selection(s), if any. The type of the result of the query execution depends on
the specification of the type of the criteria query object
created as well as the argument to the The semantics of this method are as follows:
| |
| offset | back to summary |
|---|---|
| public JpaCriteriaQuery | |
| offset | back to summary |
|---|---|
| public JpaCriteriaQuery | |
| orderBy | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed, and results will be returned in no particular order. The left-to-right sequence of the ordering expressions determines the precedence, whereby the leftmost has highest precedence.
| |
| orderBy | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed, and results will be returned in no particular order. The order of the ordering expressions in the list determines the precedence, whereby the first element in the list has highest precedence.
| |
| select | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Specify the item that is to be returned in the query result. Replaces the previously specified selection(s), if any. Note Applications using the string-based API may need to specify the type of the select item when it results from a get or join operation and the query result type is specified.
For example:
CriteriaQuery<String> q = cb.createQuery(String.class);
Root<Order> order = q.from(Order.class);
q.select(order.get("shippingAddress").<String>get("state"));
CriteriaQuery<Product> q2 = cb.createQuery(Product.class);
q2.select(q2.from(Order.class)
.join("items")
.<Item,Product>join("product"));
| |
| where | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Modify the query to restrict the query result according
to the specified boolean expression.
Replaces the previously added restriction(s), if any.
This method only overrides the return type of the
corresponding
| |
| where | back to summary |
|---|---|
| public JpaCriteriaQuery Redeclares jakarta. Doc from jakarta. Modify the query to restrict the query result according
to the conjunction of the specified restriction predicates.
Replaces the previously added restriction(s), if any.
If no restrictions are specified, any previously added
restrictions are simply removed.
This method only overrides the return type of the
corresponding
| |