T - the type of the resultpublic abstract class AbstractCriteriaQueryImpl<T> extends BaseQueryImpl<T> implements 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 |
|---|---|
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(EntityType<X> entity) |
String |
generateJpql()
Generates the JPQL for the query.
|
String |
generateSql()
Returns the generated SQL.
|
List<Expression<?>> |
getGroupList() |
PredicateImpl |
getGroupRestriction() |
PredicateImpl |
getRestriction() |
Class<T> |
getResultType() |
Set<Root<?>> |
getRoots() |
AbstractSelection<T> |
getSelection() |
AbstractQuery<T> |
groupBy(Expression<?>... grouping) |
AbstractQuery<T> |
groupBy(List<Expression<?>> grouping) |
AbstractQuery<T> |
having(Expression<Boolean> restriction) |
AbstractQuery<T> |
having(Predicate... restrictions) |
AbstractCriteriaQueryImpl<T> |
internal()
Marks the query as internal entity query.
|
boolean |
isDistinct() |
void |
registerParameter(ParameterExpressionImpl<?> parameter)
Registers the parameter as the nex SQL parameter
|
protected AbstractCriteriaQueryImpl<T> |
select(Selection<? extends T> selection)
Sets the selection
|
<U> SubqueryImpl<U> |
subquery(Class<U> type)
Create a subquery of the query.
|
void |
updateResultClass(List<Selection<?>> selections) |
AbstractQuery<T> |
where(Expression<Boolean> restriction) |
AbstractQuery<T> |
where(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 AbstractQuery<T> distinct(boolean distinct)
distinct in interface AbstractQuery<T>protected AbstractSelection<T> ensureSelection()
public <X> RootImpl<X> from(Class<X> entityClass)
from in interface AbstractQuery<T>public <X> RootImpl<X> from(EntityType<X> entity)
from in interface AbstractQuery<T>public String generateJpql()
generateJpql in interface BaseQuery<T>public String generateSql()
generateSql in interface BaseQuery<T>public List<Expression<?>> getGroupList()
getGroupList in interface AbstractQuery<T>public PredicateImpl getGroupRestriction()
getGroupRestriction in interface AbstractQuery<T>public PredicateImpl getRestriction()
getRestriction in interface AbstractQuery<T>public Class<T> getResultType()
getResultType in interface AbstractQuery<T>public Set<Root<?>> getRoots()
getRoots in interface AbstractQuery<T>public AbstractSelection<T> getSelection()
getSelection in interface AbstractQuery<T>public AbstractQuery<T> groupBy(Expression<?>... grouping)
groupBy in interface AbstractQuery<T>public AbstractQuery<T> groupBy(List<Expression<?>> grouping)
groupBy in interface AbstractQuery<T>public AbstractQuery<T> having(Expression<Boolean> restriction)
having in interface AbstractQuery<T>public AbstractQuery<T> having(Predicate... restrictions)
having in interface AbstractQuery<T>public AbstractCriteriaQueryImpl<T> internal()
public boolean isDistinct()
isDistinct in interface AbstractQuery<T>public void registerParameter(ParameterExpressionImpl<?> parameter)
parameter - the parameter to registerprotected AbstractCriteriaQueryImpl<T> select(Selection<? extends T> selection)
selection - the selectionpublic <U> SubqueryImpl<U> subquery(Class<U> type)
public void updateResultClass(List<Selection<?>> selections)
selections - the selectionspublic AbstractQuery<T> where(Expression<Boolean> restriction)
where in interface AbstractQuery<T>public AbstractQuery<T> where(Predicate... restrictions)
where in interface AbstractQuery<T>Copyright © 2012 Batoo Software & Consultancy. All Rights Reserved.