Top Fields Constructors Methods
org.hibernate.query.sqm.tree.update

public Class SqmUpdateStatement<T>

extends AbstractSqmRestrictedDmlStatement<T>
implements SqmDeleteOrUpdateStatement<T>, JpaCriteriaUpdate<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.criteria.JpaCriteriaUpdate, jakarta.persistence.criteria.CriteriaUpdate, jakarta.persistence.criteria.CommonAbstractCriteria, org.hibernate.query.criteria.JpaManipulationCriteria, org.hibernate.query.criteria.JpaQueryableCriteria, org.hibernate.query.criteria.JpaCteContainer, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.criteria.JpaCriteriaBase, org.hibernate.query.sqm.tree.SqmDeleteOrUpdateStatement, org.hibernate.query.sqm.tree.predicate.SqmWhereClauseContainer, org.hibernate.query.sqm.tree.SqmDmlStatement, org.hibernate.query.sqm.tree.cte.SqmCteContainer, org.hibernate.query.sqm.tree.SqmNode, org.hibernate.query.sqm.tree.SqmStatement, org.hibernate.query.sqm.tree.SqmVisitableNode, org.hibernate.query.sqm.tree.SqmQuery
Imports
java.util.List, .Map, .Set, org.hibernate.query.criteria.JpaCriteriaUpdate, org.hibernate.query.sqm.NodeBuilder, .SemanticQueryWalker, .SqmQuerySource, org.hibernate.query.sqm.internal.SqmCriteriaNodeBuilder, org.hibernate.query.sqm.tree.AbstractSqmRestrictedDmlStatement, .SqmCopyContext, .SqmDeleteOrUpdateStatement, org.hibernate.query.sqm.tree.cte.SqmCteStatement, org.hibernate.query.sqm.tree.domain.SqmPath, org.hibernate.query.sqm.tree.expression.SqmExpression, .SqmParameter, org.hibernate.query.sqm.tree.from.SqmRoot, jakarta.persistence.criteria.Expression, .Path, .Predicate, jakarta.persistence.metamodel.SingularAttribute

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private SqmSetClause
private boolean

Constructor Summary

AccessConstructor and Description
public
SqmUpdateStatement(SqmRoot<T> target, NodeBuilder nodeBuilder)

public
SqmUpdateStatement(SqmRoot<T> target, SqmQuerySource querySource, NodeBuilder nodeBuilder)

public
SqmUpdateStatement(Class<T> targetEntity, SqmCriteriaNodeBuilder nodeBuilder)

public
SqmUpdateStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target)

Method Summary

Modifier and TypeMethod and Description
public <X> X
accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation
private static void
public void
public <Y> void
applyAssignment(SqmPath<Y> targetPath, SqmExpression<? extends Y> value)

public SqmUpdateStatement<T>
public SqmSetClause
public boolean
public <Y, X extends Y> SqmUpdateStatement<T>
set(SingularAttribute<? super T, Y>
attribute to be updated
attribute
,
X
new value
value
)

Implements jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public <Y> SqmUpdateStatement<T>
set(SingularAttribute<? super T, Y>
attribute to be updated
attribute
,
Expression<? extends Y>
new value
value
)

Implements jakarta.persistence.criteria.CriteriaUpdate.set, jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public <Y, X extends Y> SqmUpdateStatement<T>
set(Path<Y>
attribute to be updated
attribute
,
X
new value
value
)

Implements jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public <Y> SqmUpdateStatement<T>
set(Path<Y>
attribute to be updated
attribute
,
Expression<? extends Y>
new value
value
)

Implements jakarta.persistence.criteria.CriteriaUpdate.set, jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public SqmUpdateStatement<T>
set(String
name of the attribute to be updated
attributeName
,
Object
new value
value
)

Implements jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public void
public SqmUpdateStatement<T>
public SqmUpdateStatement<T>
public SqmUpdateStatement<T>
where(Expression<Boolean>
a simple or compound boolean expression
restriction
)

Implements jakarta.persistence.criteria.CriteriaUpdate.where.

Modify the update query to restrict the target of the update according to the specified boolean expression.
public SqmUpdateStatement<T>
where(Predicate...
zero or more restriction predicates
restrictions
)

Implements jakarta.persistence.criteria.CriteriaUpdate.where.

Modify the update query to restrict the target of the update according to the conjunction of the specified restriction predicates.
Inherited from org.hibernate.query.sqm.tree.AbstractSqmRestrictedDmlStatement:
applyPredicatecopyWhereClausefromfromgetRestrictiongetRootgetWhereClauseinitAndGetWhereClausesetWheresetWheresetWhereClause

Field Detail

setClauseback to summary
private SqmSetClause setClause
versionedback to summary
private boolean versioned

Constructor Detail

SqmUpdateStatementback to summary
public SqmUpdateStatement(SqmRoot<T> target, NodeBuilder nodeBuilder)
SqmUpdateStatementback to summary
public SqmUpdateStatement(SqmRoot<T> target, SqmQuerySource querySource, NodeBuilder nodeBuilder)
SqmUpdateStatementback to summary
public SqmUpdateStatement(Class<T> targetEntity, SqmCriteriaNodeBuilder nodeBuilder)
SqmUpdateStatementback to summary
public SqmUpdateStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target)

Method Detail

acceptback to summary
public <X> X accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Doc from org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation

Annotations
@Override
appendAssignmentback to summary
private static void appendAssignment(SqmAssignment<?> sqmAssignment, StringBuilder sb)
appendHqlStringback to summary
public void appendHqlString(StringBuilder sb)

Overrides org.hibernate.query.sqm.tree.AbstractSqmRestrictedDmlStatement.appendHqlString.

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.appendHqlString.

Annotations
@Override
applyAssignmentback to summary
public <Y> void applyAssignment(SqmPath<Y> targetPath, SqmExpression<? extends Y> value)
copyback to summary
public SqmUpdateStatement<T> copy(SqmCopyContext context)

Implements org.hibernate.query.sqm.tree.SqmStatement.copy, org.hibernate.query.sqm.tree.SqmNode.copy.

Annotations
@Override
getSetClauseback to summary
public SqmSetClause getSetClause()
isVersionedback to summary
public boolean isVersioned()

Implements org.hibernate.query.criteria.JpaCriteriaUpdate.isVersioned.

Annotations
@Override
setback to summary
public <Y, X extends Y> SqmUpdateStatement<T> set(SingularAttribute<? super T, Y> attribute, X value)

Implements jakarta.persistence.criteria.CriteriaUpdate.set.

Doc from jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attribute:SingularAttribute<? super T, Y>

attribute to be updated

value:X

new value

Returns:SqmUpdateStatement<T>

the modified update query

Annotations
@Override
setback to summary
public <Y> SqmUpdateStatement<T> set(SingularAttribute<? super T, Y> attribute, Expression<? extends Y> value)

Implements jakarta.persistence.criteria.CriteriaUpdate.set, jakarta.persistence.criteria.CriteriaUpdate.set.

Doc from jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attribute:SingularAttribute<? super T, Y>

attribute to be updated

value:Expression<? extends Y>

new value

Returns:SqmUpdateStatement<T>

the modified update query

Annotations
@Override
setback to summary
public <Y, X extends Y> SqmUpdateStatement<T> set(Path<Y> attribute, X value)

Implements jakarta.persistence.criteria.CriteriaUpdate.set.

Doc from jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attribute:Path<Y>

attribute to be updated

value:X

new value

Returns:SqmUpdateStatement<T>

the modified update query

Annotations
@Override
setback to summary
public <Y> SqmUpdateStatement<T> set(Path<Y> attribute, Expression<? extends Y> value)

Implements jakarta.persistence.criteria.CriteriaUpdate.set, jakarta.persistence.criteria.CriteriaUpdate.set.

Doc from jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attribute:Path<Y>

attribute to be updated

value:Expression<? extends Y>

new value

Returns:SqmUpdateStatement<T>

the modified update query

Annotations
@Override
setback to summary
public SqmUpdateStatement<T> set(String attributeName, Object value)

Implements jakarta.persistence.criteria.CriteriaUpdate.set.

Doc from jakarta.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attributeName:String

name of the attribute to be updated

value:Object

new value

Returns:SqmUpdateStatement<T>

the modified update query

Annotations
@Override
@SuppressWarnings:rawtypes, unchecked
setSetClauseback to summary
public void setSetClause(SqmSetClause setClause)
versionedback to summary
public SqmUpdateStatement<T> versioned()

Implements org.hibernate.query.criteria.JpaCriteriaUpdate.versioned.

Annotations
@Override
versionedback to summary
public SqmUpdateStatement<T> versioned(boolean versioned)

Implements org.hibernate.query.criteria.JpaCriteriaUpdate.versioned.

Annotations
@Override
whereback to summary
public SqmUpdateStatement<T> where(Expression<Boolean> restriction)

Implements jakarta.persistence.criteria.CriteriaUpdate.where.

Doc from jakarta.persistence.criteria.CriteriaUpdate.where.

Modify the update query to restrict the target of the update according to the specified boolean expression. Replaces the previously added restriction(s), if any.

Parameters
restriction:Expression<Boolean>

a simple or compound boolean expression

Returns:SqmUpdateStatement<T>

the modified update query

Annotations
@Override
whereback to summary
public SqmUpdateStatement<T> where(Predicate... restrictions)

Implements jakarta.persistence.criteria.CriteriaUpdate.where.

Doc from jakarta.persistence.criteria.CriteriaUpdate.where.

Modify 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.

Parameters
restrictions:Predicate[]

zero or more restriction predicates

Returns:SqmUpdateStatement<T>

the modified update query

Annotations
@Override