public abstract class AbstractQueryImpl<T> extends CommonAbstractCriteriaImpl<T> implements jakarta.persistence.criteria.AbstractQuery<T>
Purpose: Contains the implementation of the AbstractQuery interface of the JPA criteria API.
Description: This is the container class for the components that define a query. This is the superclass of both the CriteriaQuery and the SubQuery.
CriteriaQuery,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractQueryImpl.ResultType |
| Modifier and Type | Field and Description |
|---|---|
protected Expression |
baseExpression |
protected boolean |
distinct |
protected List<jakarta.persistence.criteria.Expression<?>> |
groupBy |
protected jakarta.persistence.criteria.Predicate |
havingClause |
protected AbstractQueryImpl.ResultType |
queryResult |
protected Set<jakarta.persistence.criteria.Root<?>> |
roots |
metamodel, parameters, queryBuilder, queryType, where| Constructor and Description |
|---|
AbstractQueryImpl(jakarta.persistence.metamodel.Metamodel metamodel,
AbstractQueryImpl.ResultType queryResult,
CriteriaBuilderImpl queryBuilder,
Class<T> resultType) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addJoin(FromImpl join) |
jakarta.persistence.criteria.AbstractQuery<T> |
distinct(boolean distinct)
Specify whether duplicate query results will be eliminated.
|
protected void |
findJoins(FromImpl root) |
protected void |
findRootAndParameters(jakarta.persistence.criteria.Selection<?> selection) |
<X> jakarta.persistence.criteria.Root<X> |
from(Class<X> entityClass)
Add a query root corresponding to the given entity, forming a Cartesian
product with any existing roots.
|
<X> jakarta.persistence.criteria.Root<X> |
from(jakarta.persistence.metamodel.EntityType<X> entity)
Add a query root corresponding to the given entity, forming a Cartesian
product with any existing roots.
|
protected Expression |
getBaseExpression() |
protected Expression |
getBaseExpression(jakarta.persistence.criteria.Root root) |
List<jakarta.persistence.criteria.Expression<?>> |
getGroupList()
Return a list of the grouping expressions
|
jakarta.persistence.criteria.Predicate |
getGroupRestriction()
Return the predicate that corresponds to the restriction(s) over the
grouping items.
|
Set<jakarta.persistence.criteria.Root<?>> |
getRoots()
Return the query roots.
|
jakarta.persistence.criteria.AbstractQuery<T> |
groupBy(jakarta.persistence.criteria.Expression<?>... grouping)
Specify the expressions that are used to form groups over the query
results.
|
jakarta.persistence.criteria.AbstractQuery<T> |
groupBy(List<jakarta.persistence.criteria.Expression<?>> grouping)
Specify the expressions that are used to form groups over
the query results.
|
jakarta.persistence.criteria.AbstractQuery<T> |
having(jakarta.persistence.criteria.Expression<Boolean> restriction)
Specify a restriction over the groups of the query.
|
jakarta.persistence.criteria.AbstractQuery<T> |
having(jakarta.persistence.criteria.Predicate... restrictions)
Specify restrictions over the groups of the query according the
conjunction of the specified restriction predicates.
|
protected void |
integrateRoot(RootImpl root)
Used to use a root from a different query.
|
boolean |
isDistinct()
Return whether duplicate query results must be eliminated or retained.
|
jakarta.persistence.criteria.AbstractQuery<T> |
where(jakarta.persistence.criteria.Expression<Boolean> restriction)
Modify the query to restrict the query result according to the specified
boolean expression.
|
jakarta.persistence.criteria.AbstractQuery<T> |
where(jakarta.persistence.criteria.Predicate... restrictions)
Modify the query to restrict the query result according to the
conjunction of the specified restriction predicates.
|
addParameter, findRootAndParameters, getDatabaseQuery, getParameters, getRestriction, getResultType, internalFrom, internalFrom, subquery, translateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected AbstractQueryImpl.ResultType queryResult
protected boolean distinct
protected jakarta.persistence.criteria.Predicate havingClause
protected List<jakarta.persistence.criteria.Expression<?>> groupBy
protected Set<jakarta.persistence.criteria.Root<?>> roots
protected Expression baseExpression
public AbstractQueryImpl(jakarta.persistence.metamodel.Metamodel metamodel,
AbstractQueryImpl.ResultType queryResult,
CriteriaBuilderImpl queryBuilder,
Class<T> resultType)
public jakarta.persistence.criteria.AbstractQuery<T> groupBy(List<jakarta.persistence.criteria.Expression<?>> grouping)
groupBy in interface jakarta.persistence.criteria.AbstractQuery<T>grouping - list of zero or more grouping expressionspublic jakarta.persistence.criteria.AbstractQuery<T> groupBy(jakarta.persistence.criteria.Expression<?>... grouping)
groupBy in interface jakarta.persistence.criteria.AbstractQuery<T>grouping - zero or more grouping expressionspublic jakarta.persistence.criteria.AbstractQuery<T> having(jakarta.persistence.criteria.Expression<Boolean> restriction)
having in interface jakarta.persistence.criteria.AbstractQuery<T>restriction - a simple or compound boolean expressionpublic jakarta.persistence.criteria.AbstractQuery<T> having(jakarta.persistence.criteria.Predicate... restrictions)
having in interface jakarta.persistence.criteria.AbstractQuery<T>restrictions - zero or more restriction predicatespublic abstract void addJoin(FromImpl join)
public jakarta.persistence.criteria.AbstractQuery<T> distinct(boolean distinct)
distinct in interface jakarta.persistence.criteria.AbstractQuery<T>distinct - boolean value specifying whether duplicate results must be
eliminated from the query result or whether they must be
retainedprotected Expression getBaseExpression()
getBaseExpression in class CommonAbstractCriteriaImpl<T>protected Expression getBaseExpression(jakarta.persistence.criteria.Root root)
public List<jakarta.persistence.criteria.Expression<?>> getGroupList()
getGroupList in interface jakarta.persistence.criteria.AbstractQuery<T>public jakarta.persistence.criteria.Predicate getGroupRestriction()
getGroupRestriction in interface jakarta.persistence.criteria.AbstractQuery<T>public Set<jakarta.persistence.criteria.Root<?>> getRoots()
getRoots in interface jakarta.persistence.criteria.AbstractQuery<T>protected void integrateRoot(RootImpl root)
CommonAbstractCriteriaImplintegrateRoot in class CommonAbstractCriteriaImpl<T>public boolean isDistinct()
isDistinct in interface jakarta.persistence.criteria.AbstractQuery<T>protected void findJoins(FromImpl root)
protected void findRootAndParameters(jakarta.persistence.criteria.Selection<?> selection)
public <X> jakarta.persistence.criteria.Root<X> from(jakarta.persistence.metamodel.EntityType<X> entity)
from in interface jakarta.persistence.criteria.AbstractQuery<T>entity - metamodel entity representing the entity of type Xpublic <X> jakarta.persistence.criteria.Root<X> from(Class<X> entityClass)
from in interface jakarta.persistence.criteria.AbstractQuery<T>entityClass - the entity classpublic jakarta.persistence.criteria.AbstractQuery<T> where(jakarta.persistence.criteria.Expression<Boolean> restriction)
where in interface jakarta.persistence.criteria.AbstractQuery<T>where in class CommonAbstractCriteriaImpl<T>restriction - a simple or compound boolean expressionpublic jakarta.persistence.criteria.AbstractQuery<T> where(jakarta.persistence.criteria.Predicate... restrictions)
where in interface jakarta.persistence.criteria.AbstractQuery<T>where in class CommonAbstractCriteriaImpl<T>restrictions - zero or more restriction predicatesCopyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.