Class CriteriaUpdateImpl<T>
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl<T>
-
- org.eclipse.persistence.internal.jpa.querydef.CriteriaUpdateImpl<T>
-
- All Implemented Interfaces:
java.io.Serializable,javax.persistence.criteria.CommonAbstractCriteria,javax.persistence.criteria.CriteriaUpdate<T>
public class CriteriaUpdateImpl<T> extends CommonAbstractCriteriaImpl<T> implements javax.persistence.criteria.CriteriaUpdate<T>
Purpose: Contains the implementation of the CriteriaUpdate interface of the JPA criteria API.
Description: This is the container class for the components that define an Update Query.
- Since:
- EclipseLink 2.5
- Author:
- Chris Delahunt
- See Also:
CriteriaUpdate, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.persistence.queries.UpdateAllQueryqueryprotected javax.persistence.criteria.Root<T>root-
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl
metamodel, parameters, queryBuilder, queryType, where
-
-
Constructor Summary
Constructors Constructor Description CriteriaUpdateImpl(javax.persistence.metamodel.Metamodel metamodel, CriteriaBuilderImpl queryBuilder, java.lang.Class<T> resultType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.persistence.criteria.Root<T>from(java.lang.Class<T> entityClass)javax.persistence.criteria.Root<T>from(javax.persistence.metamodel.EntityType<T> entity)protected org.eclipse.persistence.expressions.ExpressiongetBaseExpression()protected org.eclipse.persistence.queries.DatabaseQuerygetDatabaseQuery()javax.persistence.criteria.Root<T>getRoot()protected voidintegrateRoot(RootImpl root)Used to use a root from a different query.javax.persistence.criteria.CriteriaUpdate<T>set(java.lang.String attributeName, java.lang.Object value)<Y> javax.persistence.criteria.CriteriaUpdate<T>set(javax.persistence.criteria.Path<Y> attribute, javax.persistence.criteria.Expression<? extends Y> value)<Y,X extends Y>
javax.persistence.criteria.CriteriaUpdate<T>set(javax.persistence.criteria.Path<Y> attribute, X value)<Y> javax.persistence.criteria.CriteriaUpdate<T>set(javax.persistence.metamodel.SingularAttribute<? super T,Y> attribute, javax.persistence.criteria.Expression<? extends Y> value)<Y,X extends Y>
javax.persistence.criteria.CriteriaUpdate<T>set(javax.persistence.metamodel.SingularAttribute<? super T,Y> attribute, X value)javax.persistence.criteria.CriteriaUpdate<T>where(javax.persistence.criteria.Expression<java.lang.Boolean> restriction)Modify the query to restrict the query results according to the specified boolean expression.javax.persistence.criteria.CriteriaUpdate<T>where(javax.persistence.criteria.Predicate... restrictions)Modify the query to restrict the query results according to the conjunction of the specified restriction predicates.-
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl
addParameter, findRootAndParameters, findRootAndParameters, getParameters, getRestriction, getResultType, internalFrom, internalFrom, subquery, translate
-
-
-
-
Field Detail
-
root
protected javax.persistence.criteria.Root<T> root
-
query
protected org.eclipse.persistence.queries.UpdateAllQuery query
-
-
Constructor Detail
-
CriteriaUpdateImpl
public CriteriaUpdateImpl(javax.persistence.metamodel.Metamodel metamodel, CriteriaBuilderImpl queryBuilder, java.lang.Class<T> resultType)
-
-
Method Detail
-
from
public javax.persistence.criteria.Root<T> from(java.lang.Class<T> entityClass)
- Specified by:
fromin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
from
public javax.persistence.criteria.Root<T> from(javax.persistence.metamodel.EntityType<T> entity)
- Specified by:
fromin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
getRoot
public javax.persistence.criteria.Root<T> getRoot()
- Specified by:
getRootin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
set
public <Y,X extends Y> javax.persistence.criteria.CriteriaUpdate<T> set(javax.persistence.metamodel.SingularAttribute<? super T,Y> attribute, X value)
- Specified by:
setin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
set
public <Y> javax.persistence.criteria.CriteriaUpdate<T> set(javax.persistence.metamodel.SingularAttribute<? super T,Y> attribute, javax.persistence.criteria.Expression<? extends Y> value)
- Specified by:
setin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
set
public <Y,X extends Y> javax.persistence.criteria.CriteriaUpdate<T> set(javax.persistence.criteria.Path<Y> attribute, X value)
- Specified by:
setin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
set
public <Y> javax.persistence.criteria.CriteriaUpdate<T> set(javax.persistence.criteria.Path<Y> attribute, javax.persistence.criteria.Expression<? extends Y> value)
- Specified by:
setin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
set
public javax.persistence.criteria.CriteriaUpdate<T> set(java.lang.String attributeName, java.lang.Object value)
- Specified by:
setin interfacejavax.persistence.criteria.CriteriaUpdate<T>
-
where
public javax.persistence.criteria.CriteriaUpdate<T> where(javax.persistence.criteria.Expression<java.lang.Boolean> restriction)
Description copied from class:CommonAbstractCriteriaImplModify the query to restrict the query results according to the specified boolean expression. Replaces the previously added restriction(s), if any.- Specified by:
wherein interfacejavax.persistence.criteria.CriteriaUpdate<T>- Overrides:
wherein classCommonAbstractCriteriaImpl<T>- Parameters:
restriction- a simple or compound boolean expression- Returns:
- the modified query
-
where
public javax.persistence.criteria.CriteriaUpdate<T> where(javax.persistence.criteria.Predicate... restrictions)
Description copied from class:CommonAbstractCriteriaImplModify 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.- Specified by:
wherein interfacejavax.persistence.criteria.CriteriaUpdate<T>- Overrides:
wherein classCommonAbstractCriteriaImpl<T>- Parameters:
restrictions- zero or more restriction predicates- Returns:
- the modified query
-
integrateRoot
protected void integrateRoot(RootImpl root)
Description copied from class:CommonAbstractCriteriaImplUsed to use a root from a different query.- Specified by:
integrateRootin classCommonAbstractCriteriaImpl<T>
-
getBaseExpression
protected org.eclipse.persistence.expressions.Expression getBaseExpression()
- Specified by:
getBaseExpressionin classCommonAbstractCriteriaImpl<T>
-
getDatabaseQuery
protected org.eclipse.persistence.queries.DatabaseQuery getDatabaseQuery()
- Specified by:
getDatabaseQueryin classCommonAbstractCriteriaImpl<T>
-
-