T - the type of the resultpublic abstract class AbstractCriteriaQueryImpl<T> extends BaseQueryImpl<T> implements javax.persistence.criteria.AbstractQuery<T>
It is not intended to be used directly in query construction.
All queries must have a set of root entities (which may in turn own joins).
All queries may have a conjunction of restrictions.
| Constructor and Description |
|---|
AbstractCriteriaQueryImpl(MetamodelImpl metamodel,
Class<T> resultType) |
| Modifier and Type | Method and Description |
|---|---|
javax.persistence.criteria.AbstractQuery<T> |
distinct(boolean distinct) |
protected AbstractSelection<T> |
ensureSelection()
Ensures that there is a valid selection.
|
<X> RootImpl<X> |
from(Class<X> entityClass) |
<X> RootImpl<X> |
from(javax.persistence.metamodel.EntityType<X> entity) |
String |
generateJpql()
Generates the JPQL for the query.
|
String |
generateSql()
Returns the generated SQL.
|
List<javax.persistence.criteria.Expression<?>> |
getGroupList() |
PredicateImpl |
getGroupRestriction() |
PredicateImpl |
getRestriction() |
Class<T> |
getResultType() |
Set<javax.persistence.criteria.Root<?>> |
getRoots() |
AbstractSelection<T> |
getSelection() |
javax.persistence.criteria.AbstractQuery<T> |
groupBy(javax.persistence.criteria.Expression<?>... grouping) |
javax.persistence.criteria.AbstractQuery<T> |
groupBy(List<javax.persistence.criteria.Expression<?>> grouping) |
javax.persistence.criteria.AbstractQuery<T> |
having(javax.persistence.criteria.Expression<Boolean> restriction) |
javax.persistence.criteria.AbstractQuery<T> |
having(javax.persistence.criteria.Predicate... restrictions) |
AbstractCriteriaQueryImpl<T> |
internal()
Marks the query as internal entity query.
|
boolean |
isDistinct() |
boolean |
isInternal()
Returns if the query is internal.
|
void |
registerParameter(ParameterExpressionImpl<?> parameter)
Registers the parameter as the nex SQL parameter
|
protected AbstractCriteriaQueryImpl<T> |
select(javax.persistence.criteria.Selection<? extends T> selection)
Sets the selection
|
<U> SubqueryImpl<U> |
subquery(Class<U> type)
Create a subquery of the query.
|
void |
updateResultClass(List<javax.persistence.criteria.Selection<?>> selections) |
javax.persistence.criteria.AbstractQuery<T> |
where(javax.persistence.criteria.Expression<Boolean> restriction) |
javax.persistence.criteria.AbstractQuery<T> |
where(javax.persistence.criteria.Predicate... restrictions) |
generateTableAlias, getAlias, getAlias, getFieldAlias, getJdbcAdaptor, getJpql, getMetamodel, getParameter, getParameters, getSql, getSqlParameters, isQuery, setNextSqlParampublic AbstractCriteriaQueryImpl(MetamodelImpl metamodel, Class<T> resultType)
metamodel - the metamodelresultType - the result typepublic javax.persistence.criteria.AbstractQuery<T> distinct(boolean distinct)
distinct in interface javax.persistence.criteria.AbstractQuery<T>protected AbstractSelection<T> ensureSelection()
public <X> RootImpl<X> from(Class<X> entityClass)
from in interface javax.persistence.criteria.AbstractQuery<T>public <X> RootImpl<X> from(javax.persistence.metamodel.EntityType<X> entity)
from in interface javax.persistence.criteria.AbstractQuery<T>public String generateJpql()
generateJpql in interface BaseQuery<T>public String generateSql()
generateSql in interface BaseQuery<T>public List<javax.persistence.criteria.Expression<?>> getGroupList()
getGroupList in interface javax.persistence.criteria.AbstractQuery<T>public PredicateImpl getGroupRestriction()
getGroupRestriction in interface javax.persistence.criteria.AbstractQuery<T>public PredicateImpl getRestriction()
getRestriction in interface javax.persistence.criteria.AbstractQuery<T>public Class<T> getResultType()
getResultType in interface javax.persistence.criteria.AbstractQuery<T>public Set<javax.persistence.criteria.Root<?>> getRoots()
getRoots in interface javax.persistence.criteria.AbstractQuery<T>public AbstractSelection<T> getSelection()
getSelection in interface javax.persistence.criteria.AbstractQuery<T>public javax.persistence.criteria.AbstractQuery<T> groupBy(javax.persistence.criteria.Expression<?>... grouping)
groupBy in interface javax.persistence.criteria.AbstractQuery<T>public javax.persistence.criteria.AbstractQuery<T> groupBy(List<javax.persistence.criteria.Expression<?>> grouping)
groupBy in interface javax.persistence.criteria.AbstractQuery<T>public javax.persistence.criteria.AbstractQuery<T> having(javax.persistence.criteria.Expression<Boolean> restriction)
having in interface javax.persistence.criteria.AbstractQuery<T>public javax.persistence.criteria.AbstractQuery<T> having(javax.persistence.criteria.Predicate... restrictions)
having in interface javax.persistence.criteria.AbstractQuery<T>public AbstractCriteriaQueryImpl<T> internal()
public boolean isDistinct()
isDistinct in interface javax.persistence.criteria.AbstractQuery<T>public boolean isInternal()
isInternal in interface BaseQuery<T>public void registerParameter(ParameterExpressionImpl<?> parameter)
parameter - the parameter to registerprotected AbstractCriteriaQueryImpl<T> select(javax.persistence.criteria.Selection<? extends T> selection)
selection - the selectionpublic <U> SubqueryImpl<U> subquery(Class<U> type)
public void updateResultClass(List<javax.persistence.criteria.Selection<?>> selections)
selections - the selectionspublic javax.persistence.criteria.AbstractQuery<T> where(javax.persistence.criteria.Expression<Boolean> restriction)
where in interface javax.persistence.criteria.AbstractQuery<T>Copyright © 2012 Batoo Software & Consultancy. All Rights Reserved.