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>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.query.sqm.tree.SqmStatement
SqmStatement.ParameterResolutions
-
-
Constructor Summary
Constructors Constructor Description SqmUpdateStatement(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> X
accept(SemanticQueryWalker<X> walker)
Accept the walker per visitationvoid
appendHqlString(StringBuilder sb)
<Y> void
applyAssignment(SqmPath<Y> targetPath, SqmExpression<? extends Y> value)
<Y> void
applyAssignment(SqmAssignment<Y> assignment)
SqmUpdateStatement<T>
copy(SqmCopyContext context)
SqmSetClause
getSetClause()
boolean
isVersioned()
<Y> SqmUpdateStatement<T>
set(Path<Y> attribute, Expression<? extends Y> value)
<Y,X extends Y>
SqmUpdateStatement<T>set(Path<Y> attribute, X value)
<Y> SqmUpdateStatement<T>
set(SingularAttribute<? super T,Y> attribute, Expression<? extends Y> value)
<Y,X extends Y>
SqmUpdateStatement<T>set(SingularAttribute<? super T,Y> attribute, X value)
SqmUpdateStatement<T>
set(String attributeName, Object value)
void
setSetClause(SqmSetClause setClause)
void
setTarget(JpaRoot<T> root)
Set the root pathvoid
validate(@Nullable String hql)
SqmUpdateStatement<T>
versioned()
SqmUpdateStatement<T>
versioned(boolean versioned)
SqmUpdateStatement<T>
where(Expression<Boolean> restriction)
SqmUpdateStatement<T>
where(Predicate... restrictions)
-
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmRestrictedDmlStatement
applyPredicate, copyWhereClause, from, from, getRestriction, getRoot, getWhereClause, initAndGetWhereClause, setWhere, setWhere, setWhereClause
-
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmDmlStatement
appendHqlCteString, copyCteStatements, getCteCriteria, getCteCriterias, getCteStatement, getCteStatements, getTarget, putAllCtes, subquery, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinct
-
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmStatement
addParameter, copyParameters, getQuerySource, getSqmParameters, resolveParameters
-
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
getRestriction, subquery
-
Methods inherited from interface org.hibernate.query.criteria.JpaCriteriaUpdate
from, from, getRoot
-
Methods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinct
-
Methods inherited from interface org.hibernate.query.sqm.tree.cte.SqmCteContainer
getCteStatement, getCteStatements
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmDmlStatement
getTarget
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmStatement
getQuerySource, getSqmParameters, resolveParameters
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
Methods inherited from interface org.hibernate.query.sqm.tree.predicate.SqmWhereClauseContainer
applyPredicate, getWhereClause
-
-
-
-
Constructor Detail
-
SqmUpdateStatement
public SqmUpdateStatement(NodeBuilder nodeBuilder)
-
SqmUpdateStatement
@Deprecated(forRemoval=true) public 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. 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
public SqmUpdateStatement(Class<T> targetEntity, SqmCriteriaNodeBuilder nodeBuilder)
-
SqmUpdateStatement
public SqmUpdateStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String,SqmCteStatement<?>> cteStatements, SqmRoot<T> target)
-
-
Method Detail
-
copy
public SqmUpdateStatement<T> copy(SqmCopyContext context)
-
validate
public void validate(@Nullable String hql)
- Specified by:
validate
in classAbstractSqmDmlStatement<T>
-
getSetClause
public SqmSetClause getSetClause()
-
setSetClause
public void setSetClause(SqmSetClause setClause)
-
set
public <Y,X extends Y> SqmUpdateStatement<T> set(SingularAttribute<? super T,Y> attribute, X value)
- Specified by:
set
in interfaceCriteriaUpdate<T>
- Specified by:
set
in interfaceJpaCriteriaUpdate<T>
-
set
public <Y> SqmUpdateStatement<T> set(SingularAttribute<? super T,Y> attribute, Expression<? extends Y> value)
- Specified by:
set
in interfaceCriteriaUpdate<T>
- Specified by:
set
in interfaceJpaCriteriaUpdate<T>
-
set
public <Y,X extends Y> SqmUpdateStatement<T> set(Path<Y> attribute, X value)
- Specified by:
set
in interfaceCriteriaUpdate<T>
- Specified by:
set
in interfaceJpaCriteriaUpdate<T>
-
set
public <Y> SqmUpdateStatement<T> set(Path<Y> attribute, Expression<? extends Y> value)
- Specified by:
set
in interfaceCriteriaUpdate<T>
- Specified by:
set
in interfaceJpaCriteriaUpdate<T>
-
set
public SqmUpdateStatement<T> set(String attributeName, Object value)
- Specified by:
set
in interfaceCriteriaUpdate<T>
- Specified by:
set
in interfaceJpaCriteriaUpdate<T>
-
isVersioned
public boolean isVersioned()
- Specified by:
isVersioned
in interfaceJpaCriteriaUpdate<T>
-
versioned
public SqmUpdateStatement<T> versioned()
- Specified by:
versioned
in interfaceJpaCriteriaUpdate<T>
-
versioned
public SqmUpdateStatement<T> versioned(boolean versioned)
- Specified by:
versioned
in interfaceJpaCriteriaUpdate<T>
-
setTarget
public void setTarget(JpaRoot<T> root)
Description copied from interface:SqmDmlStatement
Set the root path- Specified by:
setTarget
in interfaceJpaManipulationCriteria<T>
- Specified by:
setTarget
in interfaceSqmDmlStatement<T>
- Overrides:
setTarget
in classAbstractSqmDmlStatement<T>
-
where
public SqmUpdateStatement<T> where(Expression<Boolean> restriction)
- Specified by:
where
in interfaceCriteriaUpdate<T>
- Specified by:
where
in interfaceJpaCriteriaUpdate<T>
-
where
public SqmUpdateStatement<T> where(Predicate... restrictions)
- Specified by:
where
in interfaceCriteriaUpdate<T>
- Specified by:
where
in interfaceJpaCriteriaUpdate<T>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
-
applyAssignment
public <Y> void applyAssignment(SqmPath<Y> targetPath, SqmExpression<? extends Y> value)
-
applyAssignment
public <Y> void applyAssignment(SqmAssignment<Y> assignment)
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
- Overrides:
appendHqlString
in classAbstractSqmRestrictedDmlStatement<T>
-
-