Module org.eclipse.persistence.jpa
Class CommonAbstractCriteriaImpl<T>
java.lang.Object
org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl<T>
- All Implemented Interfaces:
- CommonAbstractCriteria,- Serializable
- Direct Known Subclasses:
- AbstractQueryImpl,- CriteriaDeleteImpl,- CriteriaUpdateImpl
public abstract class CommonAbstractCriteriaImpl<T>
extends Object
implements 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.
- Since:
- EclipseLink 2.5
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Metamodelprotected Set<ParameterExpression<?>> protected CriteriaBuilderImplprotected Expression<Boolean> 
- 
Constructor SummaryConstructorsConstructorDescriptionCommonAbstractCriteriaImpl(Metamodel metamodel, CriteriaBuilderImpl queryBuilder, Class<T> resultType) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddParameter(ParameterExpression<?> parameter) protected voidfindRootAndParameters(Expression<?> predicate) protected voidfindRootAndParameters(Order order) protected abstract Expressionprotected abstract DatabaseQueryReturn the parameters of the queryReturn the predicate that corresponds to the where clause restriction(s).Return the result type of the query.protected abstract voidintegrateRoot(RootImpl root) Used to use a root from a different query.internalFrom(EntityType entity) Add a query root corresponding to the given entity, forming a Cartesian product with any existing roots.internalFrom(Class<?> entityClass) Add a query root corresponding to the given entity, forming a Cartesian product with any existing roots.<U> Subquery<U> Specify that the query is to be used as a subquery having the specified return type.Translates from the criteria query to a EclipseLink Database Query.where(Expression<Boolean> restriction) Modify the query to restrict the query results according to the specified boolean expression.Modify the query to restrict the query results according to the conjunction of the specified restriction predicates.
- 
Field Details- 
metamodel
- 
where
- 
queryBuilder
- 
queryType
- 
parameters
 
- 
- 
Constructor Details- 
CommonAbstractCriteriaImplpublic CommonAbstractCriteriaImpl(Metamodel metamodel, CriteriaBuilderImpl queryBuilder, Class<T> resultType) 
 
- 
- 
Method Details- 
getRestrictionReturn the predicate that corresponds to the where clause restriction(s).- Specified by:
- getRestrictionin interface- CommonAbstractCriteria
- Returns:
- where clause predicate
 
- 
getResultTypeReturn the result type of the query. If a result type was specified as an argument to the createQuery method, that type will be returned. If the query was created using the createTupleQuery method, the result type is Tuple. Otherwise, the result type is Object.- Returns:
- result type
 
- 
internalFromAdd a query root corresponding to the given entity, forming a Cartesian product with any existing roots.- Parameters:
- entity- metamodel entity representing the entity of type X
- Returns:
- query root corresponding to the given entity
 
- 
internalFromAdd a query root corresponding to the given entity, forming a Cartesian product with any existing roots.- Parameters:
- entityClass- the entity class
- Returns:
- query root corresponding to the given entity
 
- 
whereModify the query to restrict the query results according to the specified boolean expression. Replaces the previously added restriction(s), if any.- Parameters:
- restriction- a simple or compound boolean expression
- Returns:
- the modified query
 
- 
whereModify the query to restrict the query results according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.- Parameters:
- restrictions- zero or more restriction predicates
- Returns:
- the modified query
 
- 
subquerySpecify that the query is to be used as a subquery having the specified return type.- Specified by:
- subqueryin interface- CommonAbstractCriteria
- Returns:
- subquery corresponding to the query
 
- 
integrateRootUsed to use a root from a different query.
- 
findRootAndParameters
- 
findRootAndParameters
- 
getBaseExpression
- 
addParameter
- 
getDatabaseQuery
- 
getParametersReturn the parameters of the query- Returns:
- the query parameters
 
- 
translateTranslates from the criteria query to a EclipseLink Database Query.
 
-