Class SqmUpdateStatement<T>
java.lang.Object
org.hibernate.query.sqm.tree.spi.AbstractSqmNode
org.hibernate.query.sqm.tree.spi.AbstractSqmStatement<T>
org.hibernate.query.sqm.tree.spi.AbstractSqmDmlStatement<T>
org.hibernate.query.sqm.tree.spi.AbstractSqmRestrictedDmlStatement<T>
org.hibernate.query.sqm.tree.spi.update.SqmUpdateStatement<T>
- All Implemented Interfaces:
CommonAbstractCriteria, CriteriaStatement<T>, CriteriaUpdate<T>, Serializable, JpaCriteriaBase, JpaCriteriaNode, JpaCriteriaUpdate<T>, JpaCteContainer, JpaManipulationCriteria<T>, JpaQueryableCriteria<T>, org.hibernate.query.sqm.internal.ParameterCollector, SqmCteContainer, SqmWhereClauseContainer, SqmCacheable, SqmDeleteOrUpdateStatement<T>, SqmDmlStatement<T>, SqmNode, SqmQuery<T>, SqmStatement<T>, SqmVisitableNode
public class SqmUpdateStatement<T>
extends AbstractSqmRestrictedDmlStatement<T>
implements SqmDeleteOrUpdateStatement<T>, JpaCriteriaUpdate<T>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface SqmStatement
SqmStatement.ParameterResolutions -
Field Summary
Fields inherited from class AbstractSqmRestrictedDmlStatement
whereClause -
Constructor Summary
ConstructorsConstructorDescriptionSqmUpdateStatement(Class<T> targetEntity, org.hibernate.query.sqm.internal.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.SqmUpdateStatement(SqmUpdateStatement<?> original) -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidappendHqlString(StringBuilder hql, SqmRenderContext context) <Y> voidapplyAssignment(SqmPath<Y> targetPath, SqmExpression<? extends Y> value) <Y> voidapplyAssignment(SqmAssignment<Y> assignment) intcopy(SqmCopyContext context) booleaninthashCode()booleanisCompatible(Object object) booleanReturn whether this update statement is versioned.<Y> SqmUpdateStatement<T> set(Path<Y> attribute, Expression<? extends Y> value) Set an attribute value for this update statement.<Y, X extends Y>
SqmUpdateStatement<T> Set an attribute value for this update statement.<Y> SqmUpdateStatement<T> set(SingularAttribute<? super T, Y> attribute, Expression<? extends Y> value) Set an attribute value for this update statement.<Y, X extends Y>
SqmUpdateStatement<T> set(SingularAttribute<? super T, Y> attribute, X value) Set an attribute value for this update statement.Set an attribute value for this update statement.voidsetSetClause(SqmSetClause setClause) voidSet the root path<U> SqmSubQuery<U> subquery(EntityType<U> type) voidMark this update statement as versioned.versioned(boolean versioned) Set whether this update statement is versioned.where(BooleanExpression... restrictions) Set the restriction.where(Expression<Boolean> restriction) Set the restriction.where(List<? extends Expression<Boolean>> restrictions) Set the restriction.Methods inherited from class AbstractSqmRestrictedDmlStatement
applyPredicate, copyWhereClause, from, from, getRestriction, getRoot, getWhereClause, initAndGetWhereClause, setWhere, setWhere, setWhere, setWhere, setWhereClauseMethods inherited from class AbstractSqmDmlStatement
appendHqlCteString, copyCteStatements, getCteCriteria, getCteCriterias, getCteStatement, getCteStatements, getTarget, putAllCtes, subquery, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from class AbstractSqmStatement
addParameter, copyParameters, generateAlias, getParameters, getQuerySource, getSqmParameters, resolveParametersMethods inherited from class AbstractSqmNode
nodeBuilderMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommonAbstractCriteria
getParametersMethods inherited from interface JpaCriteriaBase
getRestriction, subqueryMethods inherited from interface JpaCriteriaUpdate
from, from, getRootMethods inherited from interface JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from interface SqmCteContainer
getCteStatement, getCteStatementsMethods inherited from interface SqmDmlStatement
getTargetMethods inherited from interface SqmNode
asLoggableText, nodeBuilderMethods inherited from interface SqmQuery
generateAliasMethods inherited from interface SqmStatement
getQuerySource, getSqmParameters, resolveParametersMethods inherited from interface SqmVisitableNode
toHqlStringMethods inherited from interface SqmWhereClauseContainer
applyPredicate, getWhereClause
-
Constructor Details
-
SqmUpdateStatement
-
SqmUpdateStatement
@Deprecated(forRemoval=true) public SqmUpdateStatement(@Nonnull SqmRoot<T> target, @Nonnull 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(@Nonnull SqmRoot<T> target, @Nonnull SqmQuerySource querySource, @Nonnull 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(@Nonnull NodeBuilder builder, @Nonnull SqmQuerySource querySource, @Nullable Set<SqmParameter<?>> parameters, @Nonnull Map<String, SqmCteStatement<?>> cteStatements, @Nonnull SqmRoot<T> target) -
SqmUpdateStatement
- Implementation Note:
- This form is used when transforming HQL to criteria. All it does is change the SqmQuerySource to CRITERIA in order to allow correct parameter handing.
-
-
Method Details
-
copy
-
validate
- Specified by:
validatein classAbstractSqmDmlStatement<T>
-
getSetClause
-
setSetClause
-
set
@Nonnull public <Y, X extends Y> SqmUpdateStatement<T> set(@Nonnull SingularAttribute<? super T, Y> attribute, @Nullable X value) Description copied from interface:JpaCriteriaUpdateSet an attribute value for this update statement.- Specified by:
setin interfaceCriteriaUpdate<T>- Specified by:
setin interfaceJpaCriteriaUpdate<T>
-
set
@Nonnull public <Y> SqmUpdateStatement<T> set(@Nonnull SingularAttribute<? super T, Y> attribute, @Nonnull Expression<? extends Y> value) Description copied from interface:JpaCriteriaUpdateSet an attribute value for this update statement.- Specified by:
setin interfaceCriteriaUpdate<T>- Specified by:
setin interfaceJpaCriteriaUpdate<T>
-
set
@Nonnull public <Y, X extends Y> SqmUpdateStatement<T> set(@Nonnull Path<Y> attribute, @Nullable X value) Description copied from interface:JpaCriteriaUpdateSet an attribute value for this update statement.- Specified by:
setin interfaceCriteriaUpdate<T>- Specified by:
setin interfaceJpaCriteriaUpdate<T>
-
set
@Nonnull public <Y> SqmUpdateStatement<T> set(@Nonnull Path<Y> attribute, @Nonnull Expression<? extends Y> value) Description copied from interface:JpaCriteriaUpdateSet an attribute value for this update statement.- Specified by:
setin interfaceCriteriaUpdate<T>- Specified by:
setin interfaceJpaCriteriaUpdate<T>
-
set
Description copied from interface:JpaCriteriaUpdateSet an attribute value for this update statement.- Specified by:
setin interfaceCriteriaUpdate<T>- Specified by:
setin interfaceJpaCriteriaUpdate<T>
-
isVersioned
public boolean isVersioned()Description copied from interface:JpaCriteriaUpdateReturn whether this update statement is versioned.- Specified by:
isVersionedin interfaceJpaCriteriaUpdate<T>
-
versioned
Description copied from interface:JpaCriteriaUpdateMark this update statement as versioned.- Specified by:
versionedin interfaceJpaCriteriaUpdate<T>
-
versioned
Description copied from interface:JpaCriteriaUpdateSet whether this update statement is 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:JpaCriteriaUpdateSet the restriction.- Specified by:
wherein interfaceCriteriaUpdate<T>- Specified by:
wherein interfaceJpaCriteriaUpdate<T>
-
where
Description copied from interface:JpaCriteriaUpdateSet the restriction.- Specified by:
wherein interfaceCriteriaUpdate<T>- Specified by:
wherein interfaceJpaCriteriaUpdate<T>
-
where
@Nonnull public SqmUpdateStatement<T> where(@Nonnull List<? extends Expression<Boolean>> restrictions) Description copied from interface:JpaCriteriaUpdateSet the restriction.- Specified by:
wherein interfaceCriteriaUpdate<T>- Specified by:
wherein interfaceJpaCriteriaUpdate<T>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
subquery
- Specified by:
subqueryin interfaceCommonAbstractCriteria
-
applyAssignment
public <Y> void applyAssignment(@Nonnull SqmPath<Y> targetPath, @Nonnull SqmExpression<? extends Y> value) -
applyAssignment
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classAbstractSqmRestrictedDmlStatement<T>
-
equals
- Overrides:
equalsin classAbstractSqmRestrictedDmlStatement<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractSqmRestrictedDmlStatement<T>
-
isCompatible
- Specified by:
isCompatiblein interfaceSqmCacheable- Overrides:
isCompatiblein classAbstractSqmRestrictedDmlStatement<T>
-
cacheHashCode
public int cacheHashCode()- Specified by:
cacheHashCodein interfaceSqmCacheable- Overrides:
cacheHashCodein classAbstractSqmRestrictedDmlStatement<T>
-