Class SqmDeleteStatement<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.delete.SqmDeleteStatement<T>
- All Implemented Interfaces:
CommonAbstractCriteria,CriteriaDelete<T>,Serializable,JpaCriteriaBase,JpaCriteriaDelete<T>,JpaCriteriaNode,JpaCteContainer,JpaManipulationCriteria<T>,JpaQueryableCriteria<T>,ParameterCollector,SqmCteContainer,SqmWhereClauseContainer,SqmDeleteOrUpdateStatement<T>,SqmDmlStatement<T>,SqmNode,SqmQuery<T>,SqmStatement<T>,SqmVisitableNode
public class SqmDeleteStatement<T>
extends AbstractSqmRestrictedDmlStatement<T>
implements SqmDeleteOrUpdateStatement<T>, JpaCriteriaDelete<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
ConstructorsConstructorDescriptionSqmDeleteStatement(Class<T> targetEntity, NodeBuilder nodeBuilder) SqmDeleteStatement(Class<T> targetEntity, SqmQuerySource querySource, NodeBuilder nodeBuilder) Deprecated, for removal: This API element is subject to removal in a future version.was previously used for Criteria.SqmDeleteStatement(NodeBuilder nodeBuilder) SqmDeleteStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target) SqmDeleteStatement(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 HQL. -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidcopy(SqmCopyContext context) voidwhere(Expression<Boolean> restriction) Modify the delete query to restrict the target of the deletion according to the specified boolean expression.Modify the delete query to restrict the target of the deletion 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, setTarget, 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.JpaCriteriaDelete
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
getTarget, setTargetMethods 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
-
SqmDeleteStatement
-
SqmDeleteStatement
@Deprecated(forRemoval=true) public SqmDeleteStatement(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 HQL. UseSqmDeleteStatement(NodeBuilder)instead -
SqmDeleteStatement
@Deprecated(forRemoval=true) public SqmDeleteStatement(Class<T> targetEntity, SqmQuerySource querySource, NodeBuilder nodeBuilder) Deprecated, for removal: This API element is subject to removal in a future version.was previously used for Criteria. UseSqmDeleteStatement(Class,NodeBuilder)instead -
SqmDeleteStatement
-
SqmDeleteStatement
public SqmDeleteStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target)
-
-
Method Details
-
copy
-
validate
- Specified by:
validatein classAbstractSqmDmlStatement<T>
-
where
Description copied from interface:CriteriaDeleteModify the delete query to restrict the target of the deletion according to the specified boolean expression. Replaces the previously added restriction(s), if any.- Specified by:
wherein interfaceCriteriaDelete<T>- Specified by:
wherein interfaceJpaCriteriaDelete<T>- Parameters:
restriction- a simple or compound boolean expression- Returns:
- the modified delete query
-
where
Description copied from interface:CriteriaDeleteModify the delete query to restrict the target of the deletion 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 interfaceCriteriaDelete<T>- Specified by:
wherein interfaceJpaCriteriaDelete<T>- Parameters:
restrictions- zero or more restriction predicates- Returns:
- the modified delete query
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classAbstractSqmRestrictedDmlStatement<T>
-