public abstract class AbstractQueryImpl<T> extends CommonAbstractCriteriaImpl<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 org.eclipse.persistence.expressions.Expression |
baseExpression |
protected boolean |
distinct |
protected java.util.List<<any>> |
groupBy |
protected Predicate |
havingClause |
protected AbstractQueryImpl.ResultType |
queryResult |
protected java.util.Set<<any>> |
roots |
metamodel, parameters, queryBuilder, queryType, where| Constructor and Description |
|---|
AbstractQueryImpl(Metamodel metamodel,
AbstractQueryImpl.ResultType queryResult,
CriteriaBuilderImpl queryBuilder,
java.lang.Class<T> resultType) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addJoin(FromImpl join) |
<any> |
distinct(boolean distinct)
Specify whether duplicate query results will be eliminated.
|
protected void |
findJoins(FromImpl root) |
protected void |
findRootAndParameters(<any> selection) |
<X> <any> |
from(<any> entity)
Add a query root corresponding to the given entity, forming a Cartesian
product with any existing roots.
|
<X> <any> |
from(java.lang.Class<X> entityClass)
Add a query root corresponding to the given entity, forming a Cartesian
product with any existing roots.
|
protected org.eclipse.persistence.expressions.Expression |
getBaseExpression() |
protected org.eclipse.persistence.expressions.Expression |
getBaseExpression(Root root) |
java.util.List<<any>> |
getGroupList()
Return a list of the grouping expressions
|
Predicate |
getGroupRestriction()
Return the predicate that corresponds to the restriction(s) over the
grouping items.
|
java.util.Set<<any>> |
getRoots()
Return the query roots.
|
<any> |
groupBy(<any>... grouping)
Specify the expressions that are used to form groups over the query
results.
|
<any> |
groupBy(java.util.List<<any>> grouping)
Specify the expressions that are used to form groups over
the query results.
|
<any> |
having(<any> restriction)
Specify a restriction over the groups of the query.
|
<any> |
having(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.
|
<any> |
where(<any> restriction)
Modify the query to restrict the query result according to the specified
boolean expression.
|
<any> |
where(Predicate... restrictions)
Modify the query to restrict the query result according to the
conjunction of the specified restriction predicates.
|
addParameter, getDatabaseQuery, getParameters, getRestriction, getResultType, internalFrom, internalFrom, subquery, translateprotected AbstractQueryImpl.ResultType queryResult
protected boolean distinct
protected Predicate havingClause
protected java.util.List<<any>> groupBy
protected java.util.Set<<any>> roots
protected org.eclipse.persistence.expressions.Expression baseExpression
public AbstractQueryImpl(Metamodel metamodel,
AbstractQueryImpl.ResultType queryResult,
CriteriaBuilderImpl queryBuilder,
java.lang.Class<T> resultType)
public <any> groupBy(java.util.List<<any>> grouping)
grouping - list of zero or more grouping expressionspublic <any> groupBy(<any>... grouping)
grouping - zero or more grouping expressionspublic <any> having(<any> restriction)
restriction - a simple or compound boolean expressionpublic <any> having(Predicate... restrictions)
restrictions - zero or more restriction predicatespublic abstract void addJoin(FromImpl join)
public <any> distinct(boolean distinct)
distinct - boolean value specifying whether duplicate results must be
eliminated from the query result or whether they must be
retainedprotected org.eclipse.persistence.expressions.Expression getBaseExpression()
getBaseExpression in class CommonAbstractCriteriaImpl<T>protected org.eclipse.persistence.expressions.Expression getBaseExpression(Root root)
public java.util.List<<any>> getGroupList()
public Predicate getGroupRestriction()
public java.util.Set<<any>> getRoots()
protected void integrateRoot(RootImpl root)
CommonAbstractCriteriaImplintegrateRoot in class CommonAbstractCriteriaImpl<T>public boolean isDistinct()
protected void findJoins(FromImpl root)
protected void findRootAndParameters(<any> selection)
findRootAndParameters in class CommonAbstractCriteriaImpl<T>public <X> <any> from(<any> entity)
entity - metamodel entity representing the entity of type Xpublic <X> <any> from(java.lang.Class<X> entityClass)
entityClass - the entity classpublic <any> where(<any> restriction)
where in class CommonAbstractCriteriaImpl<T>restriction - a simple or compound boolean expressionpublic <any> where(Predicate... restrictions)
where in class CommonAbstractCriteriaImpl<T>restrictions - zero or more restriction predicates