public class CriteriaQueryImpl<T> extends AbstractQueryImpl<T>
Purpose: Contains the implementation of the CriteriaQuery interface of the JPA criteria API.
Description: This is the container class for the components that define a query.
CriteriaQuery,
Serialized FormAbstractQueryImpl.ResultType| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<FromImpl> |
joins |
protected java.util.List<Order> |
orderBy |
protected SelectionImpl<?> |
selection |
baseExpression, distinct, groupBy, havingClause, queryResult, rootsmetamodel, parameters, queryBuilder, queryType, where| Constructor and Description |
|---|
CriteriaQueryImpl(Metamodel metamodel,
AbstractQueryImpl.ResultType queryResult,
java.lang.Class result,
CriteriaBuilderImpl queryBuilder) |
| Modifier and Type | Method and Description |
|---|---|
void |
addJoin(FromImpl from) |
protected ObjectLevelReadQuery |
createCompoundQuery()
Translates from the criteria query to a EclipseLink Database Query.
|
protected ObjectLevelReadQuery |
createSimpleQuery() |
<any> |
distinct(boolean distinct)
Specify whether duplicate query results will be eliminated.
|
protected DatabaseQuery |
getDatabaseQuery() |
java.util.List<Order> |
getOrderList()
Return the ordering expressions in order of precedence.
|
<any> |
getSelection()
Return the selection item of the query.
|
<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.
|
<any> |
multiselect(<any>... selections)
Specify the items that are to be returned in the query result.
|
<any> |
multiselect(java.util.List<<any>> selectionList)
Specify the items that are to be returned in the query result.
|
<any> |
orderBy(java.util.List<Order> o)
Specify the ordering expressions that are used to order the query
results.
|
<any> |
orderBy(Order... o)
Specify the ordering expressions that are used to order the query
results.
|
void |
populateAndSetConstructorSelection(ConstructorSelectionImpl constructorSelection,
java.lang.Class<?> class1,
<any>... selections)
This method will set this queryImpl's selection to a ConstructorSelectionImpl, creating a new
instance or populating the one passed in as necessary.
|
<any> |
select(<any> selection)
Specify the item that is to be returned in the query result.
|
DatabaseQuery |
translate()
Translates from the criteria query to a EclipseLink Database Query.
|
<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.
|
findJoins, findRootAndParameters, from, from, getBaseExpression, getBaseExpression, getGroupList, getGroupRestriction, getRoots, integrateRoot, isDistinctaddParameter, getParameters, getRestriction, getResultType, internalFrom, internalFrom, subqueryprotected SelectionImpl<?> selection
protected java.util.List<Order> orderBy
protected java.util.Set<FromImpl> joins
public CriteriaQueryImpl(Metamodel metamodel,
AbstractQueryImpl.ResultType queryResult,
java.lang.Class result,
CriteriaBuilderImpl queryBuilder)
public <any> select(<any> selection)
selection - selection specifying the item that is to be returned in the
query resultpublic <any> multiselect(<any>... selections)
selections - expressions specifying the items that are to be returned in
the query resultpublic <any> multiselect(java.util.List<<any>> selectionList)
selectionList - list of expressions specifying the items that to be are
returned in the query resultpublic <any> where(<any> restriction)
where in class AbstractQueryImpl<T>restriction - a simple or compound boolean expressionpublic <any> where(Predicate... restrictions)
where in class AbstractQueryImpl<T>restrictions - zero or more restriction predicatespublic <any> groupBy(<any>... grouping)
groupBy in class AbstractQueryImpl<T>grouping - zero or more grouping expressionspublic <any> groupBy(java.util.List<<any>> grouping)
groupBy in class AbstractQueryImpl<T>grouping - list of zero or more grouping expressionspublic <any> having(<any> restriction)
having in class AbstractQueryImpl<T>restriction - a simple or compound boolean expressionpublic <any> having(Predicate... restrictions)
having in class AbstractQueryImpl<T>restrictions - zero or more restriction predicatespublic <any> orderBy(Order... o)
o - zero or more ordering expressionspublic <any> orderBy(java.util.List<Order> o)
o - list of zero or more ordering expressionspublic void populateAndSetConstructorSelection(ConstructorSelectionImpl constructorSelection, java.lang.Class<?> class1, <any>... selections) throws java.lang.IllegalArgumentException
class1 - selections - java.lang.IllegalArgumentExceptionpublic <any> distinct(boolean distinct)
distinct in class AbstractQueryImpl<T>distinct - boolean value specifying whether duplicate results must be
eliminated from the query result or whether they must be
retainedpublic void addJoin(FromImpl from)
addJoin in class AbstractQueryImpl<T>protected DatabaseQuery getDatabaseQuery()
getDatabaseQuery in class CommonAbstractCriteriaImpl<T>public java.util.List<Order> getOrderList()
public <any> getSelection()
protected ObjectLevelReadQuery createCompoundQuery()
protected ObjectLevelReadQuery createSimpleQuery()
public DatabaseQuery translate()
translate in class CommonAbstractCriteriaImpl<T>