Class SqmUpdateStatement<T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.AbstractSqmStatement<E>
org.hibernate.query.sqm.tree.AbstractSqmDmlStatement<T>
org.hibernate.query.sqm.tree.AbstractSqmRestrictedDmlStatement<T>
org.hibernate.query.sqm.tree.update.SqmUpdateStatement<T>
- All Implemented Interfaces:
CommonAbstractCriteria,CriteriaUpdate<T>,Serializable,JpaCriteriaBase,JpaCriteriaNode,JpaCriteriaUpdate<T>,JpaCteContainer,JpaManipulationCriteria<T>,JpaQueryableCriteria<T>,ParameterCollector,SqmCteContainer,SqmWhereClauseContainer,SqmDeleteOrUpdateStatement<T>,SqmDmlStatement<T>,SqmNode,SqmQuery<T>,SqmStatement<T>,SqmVisitableNode
public class SqmUpdateStatement<T>
extends AbstractSqmRestrictedDmlStatement<T>
implements SqmDeleteOrUpdateStatement<T>, JpaCriteriaUpdate<T>
- Author:
- Steve Ebersole
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.query.sqm.tree.SqmStatement
SqmStatement.ParameterResolutions -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmUpdateStatement(Class<T> targetEntity, SqmCriteriaNodeBuilder nodeBuilder) SqmUpdateStatement(NodeBuilder nodeBuilder) SqmUpdateStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target) SqmUpdateStatement(SqmRoot<T> target, NodeBuilder nodeBuilder) Deprecated, for removal: This API element is subject to removal in a future version.was previously used for HQL.SqmUpdateStatement(SqmRoot<T> target, SqmQuerySource querySource, NodeBuilder nodeBuilder) Deprecated, for removal: This API element is subject to removal in a future version.was previously used for Criteria. -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoid<Y> voidapplyAssignment(SqmPath<Y> targetPath, SqmExpression<? extends Y> value) <Y> voidapplyAssignment(SqmAssignment<Y> assignment) copy(SqmCopyContext context) boolean<Y> SqmUpdateStatement<T>set(Path<Y> attribute, Expression<? extends Y> value) Update the value of the specified attribute.<Y,X extends Y>
SqmUpdateStatement<T>Update the value of the specified attribute.<Y> SqmUpdateStatement<T>set(SingularAttribute<? super T, Y> attribute, Expression<? extends Y> value) Update the value of the specified attribute.<Y,X extends Y>
SqmUpdateStatement<T>set(SingularAttribute<? super T, Y> attribute, X value) Update the value of the specified attribute.Update the value of the specified attribute.voidsetSetClause(SqmSetClause setClause) voidSet the root pathvoidversioned(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 class org.hibernate.query.sqm.tree.AbstractSqmRestrictedDmlStatement
applyPredicate, copyWhereClause, from, from, getRestriction, getRoot, getWhereClause, initAndGetWhereClause, setWhere, setWhere, setWhereClauseMethods inherited from class org.hibernate.query.sqm.tree.AbstractSqmDmlStatement
appendHqlCteString, copyCteStatements, getCteCriteria, getCteCriterias, getCteStatement, getCteStatements, getTarget, putAllCtes, subquery, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from class org.hibernate.query.sqm.tree.AbstractSqmStatement
addParameter, copyParameters, getQuerySource, getSqmParameters, resolveParametersMethods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
getRestriction, subqueryMethods inherited from interface org.hibernate.query.criteria.JpaCriteriaUpdate
from, from, getRootMethods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from interface org.hibernate.query.sqm.tree.cte.SqmCteContainer
getCteStatement, getCteStatementsMethods inherited from interface org.hibernate.query.sqm.tree.SqmDmlStatement
getTargetMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.SqmStatement
getQuerySource, getSqmParameters, resolveParametersMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlStringMethods inherited from interface org.hibernate.query.sqm.tree.predicate.SqmWhereClauseContainer
applyPredicate, getWhereClause
-
Constructor Details
-
SqmUpdateStatement
-
SqmUpdateStatement
Deprecated, for removal: This API element is subject to removal in a future version.was previously used for HQL. UseSqmUpdateStatement(NodeBuilder)instead -
SqmUpdateStatement
@Deprecated(forRemoval=true) public SqmUpdateStatement(SqmRoot<T> target, SqmQuerySource querySource, NodeBuilder nodeBuilder) Deprecated, for removal: This API element is subject to removal in a future version.was previously used for Criteria. UseSqmUpdateStatement(Class, SqmCriteriaNodeBuilder)instead. -
SqmUpdateStatement
-
SqmUpdateStatement
public SqmUpdateStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target)
-
-
Method Details
-
copy
-
validate
- Specified by:
validatein classAbstractSqmDmlStatement<T>
-
getSetClause
-
setSetClause
-
set
public <Y,X extends Y> SqmUpdateStatement<T> set(SingularAttribute<? super T, Y> attribute, X value) Description copied from interface:CriteriaUpdateUpdate the value of the specified attribute.- Specified by:
setin interfaceCriteriaUpdate<T>- Specified by:
setin interfaceJpaCriteriaUpdate<T>- Parameters:
attribute- attribute to be updatedvalue- new value- Returns:
- the modified update query
-
set
public <Y> SqmUpdateStatement<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>- Specified by:
setin interfaceJpaCriteriaUpdate<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>- Specified by:
setin interfaceJpaCriteriaUpdate<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>- Specified by:
setin interfaceJpaCriteriaUpdate<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>- Specified by:
setin interfaceJpaCriteriaUpdate<T>- Parameters:
attributeName- name of the attribute to be updatedvalue- new value- Returns:
- the modified update query
-
isVersioned
public boolean isVersioned()- Specified by:
isVersionedin interfaceJpaCriteriaUpdate<T>
-
versioned
- Specified by:
versionedin interfaceJpaCriteriaUpdate<T>
-
versioned
- Specified by:
versionedin interfaceJpaCriteriaUpdate<T>
-
setTarget
Description copied from interface:SqmDmlStatementSet the root path- Specified by:
setTargetin interfaceJpaManipulationCriteria<T>- Specified by:
setTargetin interfaceSqmDmlStatement<T>- Overrides:
setTargetin classAbstractSqmDmlStatement<T>
-
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>- Specified by:
wherein interfaceJpaCriteriaUpdate<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>- Specified by:
wherein interfaceJpaCriteriaUpdate<T>- Parameters:
restrictions- zero or more restriction predicates- Returns:
- the modified update query
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
applyAssignment
-
applyAssignment
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classAbstractSqmRestrictedDmlStatement<T>
-