Class AbstractSqmInsertStatement<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.insert.AbstractSqmInsertStatement<T>
- All Implemented Interfaces:
CommonAbstractCriteria
,Serializable
,JpaCriteriaBase
,JpaCriteriaInsert<T>
,JpaCriteriaNode
,JpaCteContainer
,JpaManipulationCriteria<T>
,JpaQueryableCriteria<T>
,ParameterCollector
,SqmCteContainer
,SqmInsertStatement<T>
,SqmDmlStatement<T>
,SqmNode
,SqmQuery<T>
,SqmStatement<T>
,SqmVisitableNode
- Direct Known Subclasses:
SqmInsertSelectStatement
,SqmInsertValuesStatement
public abstract class AbstractSqmInsertStatement<T>
extends AbstractSqmDmlStatement<T>
implements SqmInsertStatement<T>
Convenience base class for InsertSqmStatement implementations.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.query.sqm.tree.SqmStatement
SqmStatement.ParameterResolutions
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractSqmInsertStatement
(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target, List<SqmPath<?>> insertionTargetPaths, SqmConflictClause<T> conflictClause) protected
AbstractSqmInsertStatement
(SqmRoot<T> targetRoot, SqmQuerySource querySource, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInsertTargetStateField
(SqmPath<?> stateField) void
copyInsertionTargetPaths
(SqmCopyContext context) Create a new conflict clause for this insert statement.@Nullable SqmConflictClause<T>
Returns the conflict clause that defines what happens when an insert violates a unique constraint, ornull
if there is none.Returns the insertion target paths.Sets the conflict clause that defines what happens when an insert violates a unique constraint.onConflict
(@Nullable JpaConflictClause<T> conflictClause) Sets the conflict clause that defines what happens when an insert violates a unique constraint.setInsertionTargetPaths
(Path<?>... insertionTargetPaths) Sets the insertion target paths.setInsertionTargetPaths
(List<? extends Path<?>> insertionTargetPaths) Sets the insertion target paths.void
Set the root pathprotected void
verifyInsertTypesMatch
(List<SqmPath<?>> insertionTargetPaths, List<? extends SqmTypedNode<?>> expressions) void
visitInsertionTargetPaths
(Consumer<SqmPath<?>> consumer) Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmDmlStatement
appendHqlCteString, copyCteStatements, getCteCriteria, getCteCriterias, getCteStatement, getCteStatements, getTarget, putAllCtes, subquery, validate, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinct
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmStatement
addParameter, copyParameters, getParameters, 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 jakarta.persistence.criteria.CommonAbstractCriteria
getParameters, subquery
Methods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
getRestriction, subquery
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.insert.SqmInsertStatement
copy
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
accept, toHqlString
-
Constructor Details
-
AbstractSqmInsertStatement
protected AbstractSqmInsertStatement(SqmRoot<T> targetRoot, SqmQuerySource querySource, NodeBuilder nodeBuilder) -
AbstractSqmInsertStatement
protected AbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target, List<SqmPath<?>> insertionTargetPaths, SqmConflictClause<T> conflictClause)
-
-
Method Details
-
copyInsertionTargetPaths
-
verifyInsertTypesMatch
protected void verifyInsertTypesMatch(List<SqmPath<?>> insertionTargetPaths, List<? extends SqmTypedNode<?>> expressions) -
setTarget
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>
-
getInsertionTargetPaths
Description copied from interface:JpaCriteriaInsert
Returns the insertion target paths.- Specified by:
getInsertionTargetPaths
in interfaceJpaCriteriaInsert<T>
- Specified by:
getInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
setInsertionTargetPaths
Description copied from interface:JpaCriteriaInsert
Sets the insertion target paths.- Specified by:
setInsertionTargetPaths
in interfaceJpaCriteriaInsert<T>
- Specified by:
setInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
setInsertionTargetPaths
Description copied from interface:JpaCriteriaInsert
Sets the insertion target paths.- Specified by:
setInsertionTargetPaths
in interfaceJpaCriteriaInsert<T>
- Specified by:
setInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
addInsertTargetStateField
-
visitInsertionTargetPaths
- Specified by:
visitInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
createConflictClause
Description copied from interface:JpaCriteriaInsert
Create a new conflict clause for this insert statement.- Specified by:
createConflictClause
in interfaceJpaCriteriaInsert<T>
- Returns:
- a new conflict clause
- See Also:
-
getConflictClause
Description copied from interface:JpaCriteriaInsert
Returns the conflict clause that defines what happens when an insert violates a unique constraint, ornull
if there is none.- Specified by:
getConflictClause
in interfaceJpaCriteriaInsert<T>
- Specified by:
getConflictClause
in interfaceSqmInsertStatement<T>
-
onConflict
Description copied from interface:JpaCriteriaInsert
Sets the conflict clause that defines what happens when an insert violates a unique constraint.- Specified by:
onConflict
in interfaceJpaCriteriaInsert<T>
-
onConflict
Description copied from interface:JpaCriteriaInsert
Sets the conflict clause that defines what happens when an insert violates a unique constraint.- Specified by:
onConflict
in interfaceJpaCriteriaInsert<T>
-
appendHqlString
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
-