public abstract class CommonAbstractCriteriaImpl<T> extends Object implements jakarta.persistence.criteria.CommonAbstractCriteria, Serializable
Purpose: Contains the implementation of the CommonAbstractCriteria interface of the JPA criteria API.
Description: This is the container class for the components that define a query. This is the superclass of CriteriaQuery, SubQuery, CriteriaDelete and CriteriaUpdate.
CommonAbstractCriteria,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected jakarta.persistence.metamodel.Metamodel |
metamodel |
protected Set<jakarta.persistence.criteria.ParameterExpression<?>> |
parameters |
protected CriteriaBuilderImpl |
queryBuilder |
protected Class |
queryType |
protected jakarta.persistence.criteria.Expression<Boolean> |
where |
| Constructor and Description |
|---|
CommonAbstractCriteriaImpl(jakarta.persistence.metamodel.Metamodel metamodel,
CriteriaBuilderImpl queryBuilder,
Class<T> resultType) |
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(jakarta.persistence.criteria.ParameterExpression<?> parameter) |
protected void |
findRootAndParameters(jakarta.persistence.criteria.Expression<?> predicate) |
protected abstract Expression |
getBaseExpression() |
protected abstract DatabaseQuery |
getDatabaseQuery() |
Set<jakarta.persistence.criteria.ParameterExpression<?>> |
getParameters()
Return the parameters of the query
|
jakarta.persistence.criteria.Predicate |
getRestriction()
Return the predicate that corresponds to the where clause restriction(s).
|
Class<T> |
getResultType()
Return the result type of the query.
|
protected abstract void |
integrateRoot(RootImpl root)
Used to use a root from a different query.
|
jakarta.persistence.criteria.Root |
internalFrom(Class entityClass)
Add a query root corresponding to the given entity, forming a Cartesian
product with any existing roots.
|
jakarta.persistence.criteria.Root |
internalFrom(jakarta.persistence.metamodel.EntityType entity)
Add a query root corresponding to the given entity, forming a Cartesian
product with any existing roots.
|
<U> jakarta.persistence.criteria.Subquery<U> |
subquery(Class<U> type)
Specify that the query is to be used as a subquery having the specified
return type.
|
DatabaseQuery |
translate()
Translates from the criteria query to a EclipseLink Database Query.
|
jakarta.persistence.criteria.CommonAbstractCriteria |
where(jakarta.persistence.criteria.Expression<Boolean> restriction)
Modify the query to restrict the query results according to the specified
boolean expression.
|
jakarta.persistence.criteria.CommonAbstractCriteria |
where(jakarta.persistence.criteria.Predicate... restrictions)
Modify the query to restrict the query results according to the
conjunction of the specified restriction predicates.
|
protected jakarta.persistence.metamodel.Metamodel metamodel
protected jakarta.persistence.criteria.Expression<Boolean> where
protected CriteriaBuilderImpl queryBuilder
protected Class queryType
protected Set<jakarta.persistence.criteria.ParameterExpression<?>> parameters
public CommonAbstractCriteriaImpl(jakarta.persistence.metamodel.Metamodel metamodel,
CriteriaBuilderImpl queryBuilder,
Class<T> resultType)
public jakarta.persistence.criteria.Predicate getRestriction()
getRestriction in interface jakarta.persistence.criteria.CommonAbstractCriteriapublic Class<T> getResultType()
public jakarta.persistence.criteria.Root internalFrom(jakarta.persistence.metamodel.EntityType entity)
entity - metamodel entity representing the entity of type Xpublic jakarta.persistence.criteria.Root internalFrom(Class entityClass)
entityClass - the entity classpublic jakarta.persistence.criteria.CommonAbstractCriteria where(jakarta.persistence.criteria.Expression<Boolean> restriction)
restriction - a simple or compound boolean expressionpublic jakarta.persistence.criteria.CommonAbstractCriteria where(jakarta.persistence.criteria.Predicate... restrictions)
restrictions - zero or more restriction predicatespublic <U> jakarta.persistence.criteria.Subquery<U> subquery(Class<U> type)
subquery in interface jakarta.persistence.criteria.CommonAbstractCriteriaprotected abstract void integrateRoot(RootImpl root)
protected void findRootAndParameters(jakarta.persistence.criteria.Expression<?> predicate)
protected abstract Expression getBaseExpression()
public void addParameter(jakarta.persistence.criteria.ParameterExpression<?> parameter)
protected abstract DatabaseQuery getDatabaseQuery()
public Set<jakarta.persistence.criteria.ParameterExpression<?>> getParameters()
public DatabaseQuery translate()
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.