Package org.hibernate.query.criteria
Interface JpaCriteriaUpdate<T>
- All Superinterfaces:
CommonAbstractCriteria,CriteriaUpdate<T>,JpaCriteriaBase,JpaCriteriaNode,JpaCteContainer,JpaManipulationCriteria<T>,JpaQueryableCriteria<T>,Serializable
- All Known Implementing Classes:
SqmUpdateStatement
- Author:
- Steve Ebersole
-
Method Summary
Modifier and TypeMethodDescriptionfrom(EntityType<T> entity) Create and add a query root corresponding to the entity that is the target of the update.Create and add a query root corresponding to the entity that is the target of the update.getRoot()Return the query root.boolean<Y> JpaCriteriaUpdate<T>set(Path<Y> attribute, Expression<? extends Y> value) Update the value of the specified attribute.<Y,X extends Y>
JpaCriteriaUpdate<T>Update the value of the specified attribute.<Y> JpaCriteriaUpdate<T>set(SingularAttribute<? super T, Y> attribute, Expression<? extends Y> value) Update the value of the specified attribute.<Y,X extends Y>
JpaCriteriaUpdate<T>set(SingularAttribute<? super T, Y> attribute, X value) Update the value of the specified attribute.Update the value of the specified attribute.versioned(boolean versioned) where(Expression<Boolean> restriction) Modify the update query to restrict the target of the update according to the specified boolean expression.Modify the update query to restrict the target of the update according to the conjunction of the specified restriction predicates.Methods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
getRestriction, subqueryMethods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from interface org.hibernate.query.criteria.JpaManipulationCriteria
getTarget, setTarget
-
Method Details
-
isVersioned
boolean isVersioned() -
versioned
JpaCriteriaUpdate<T> versioned() -
versioned
-
from
Description copied from interface:CriteriaUpdateCreate and add a query root corresponding to the entity that is the target of the update. ACriteriaUpdateobject has a single root, the entity that is being updated.- Specified by:
fromin interfaceCriteriaUpdate<T>- Parameters:
entityClass- the entity class- Returns:
- query root corresponding to the given entity
-
from
Description copied from interface:CriteriaUpdateCreate and add a query root corresponding to the entity that is the target of the update. ACriteriaUpdateobject has a single root, the entity that is being updated.- Specified by:
fromin interfaceCriteriaUpdate<T>- Parameters:
entity- metamodel entity representing the entity of type X- Returns:
- query root corresponding to the given entity
-
set
Description copied from interface:CriteriaUpdateUpdate the value of the specified attribute.- Specified by:
setin interfaceCriteriaUpdate<T>- Parameters:
attribute- attribute to be updatedvalue- new value- Returns:
- the modified update query
-
set
<Y> JpaCriteriaUpdate<T> set(SingularAttribute<? super T, Y> attribute, Expression<? extends Y> value) Description copied from interface:CriteriaUpdateUpdate the value of the specified attribute.- Specified by:
setin interfaceCriteriaUpdate<T>- Parameters:
attribute- attribute to be updatedvalue- new value- Returns:
- the modified update query
-
set
Description copied from interface:CriteriaUpdateUpdate the value of the specified attribute.- Specified by:
setin interfaceCriteriaUpdate<T>- Parameters:
attribute- attribute to be updatedvalue- new value- Returns:
- the modified update query
-
set
Description copied from interface:CriteriaUpdateUpdate the value of the specified attribute.- Specified by:
setin interfaceCriteriaUpdate<T>- Parameters:
attribute- attribute to be updatedvalue- new value- Returns:
- the modified update query
-
set
Description copied from interface:CriteriaUpdateUpdate the value of the specified attribute.- Specified by:
setin interfaceCriteriaUpdate<T>- Parameters:
attributeName- name of the attribute to be updatedvalue- new value- Returns:
- the modified update query
-
getRoot
Description copied from interface:CriteriaUpdateReturn the query root.- Specified by:
getRootin interfaceCriteriaUpdate<T>- Returns:
- the query root
-
where
Description copied from interface:CriteriaUpdateModify the update query to restrict the target of the update according to the specified boolean expression. Replaces the previously added restriction(s), if any.- Specified by:
wherein interfaceCriteriaUpdate<T>- Parameters:
restriction- a simple or compound boolean expression- Returns:
- the modified update query
-
where
Description copied from interface:CriteriaUpdateModify the update query to restrict the target of the update 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 interfaceCriteriaUpdate<T>- Parameters:
restrictions- zero or more restriction predicates- Returns:
- the modified update query
-