Class AbstractSqmInsertStatement<T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.AbstractSqmStatement<T>
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
ConstructorsModifierConstructorDescriptionprotectedAbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target, List<SqmPath<?>> insertionTargetPaths, SqmConflictClause<T> conflictClause) protectedAbstractSqmInsertStatement(SqmRoot<T> targetRoot, SqmQuerySource querySource, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInsertTargetStateField(SqmPath<?> stateField) voidappendHqlString(StringBuilder hql, SqmRenderContext context) 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, ornullif 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.voidSet the root pathprotected voidverifyInsertTypesMatch(List<SqmPath<?>> insertionTargetPaths, List<? extends SqmTypedNode<?>> expressions) voidvisitInsertionTargetPaths(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, withRecursiveUnionDistinctMethods inherited from class org.hibernate.query.sqm.tree.AbstractSqmStatement
addParameter, copyParameters, generateAlias, getParameters, 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 jakarta.persistence.criteria.CommonAbstractCriteria
getParameters, subqueryMethods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
getRestriction, subqueryMethods 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
getTargetMethods inherited from interface org.hibernate.query.sqm.tree.insert.SqmInsertStatement
copyMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.SqmQuery
generateAliasMethods inherited from interface org.hibernate.query.sqm.tree.SqmStatement
getQuerySource, getSqmParameters, resolveParametersMethods 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:SqmDmlStatementSet the root path- Specified by:
setTargetin interfaceJpaManipulationCriteria<T>- Specified by:
setTargetin interfaceSqmDmlStatement<T>- Overrides:
setTargetin classAbstractSqmDmlStatement<T>
-
getInsertionTargetPaths
Description copied from interface:JpaCriteriaInsertReturns the insertion target paths.- Specified by:
getInsertionTargetPathsin interfaceJpaCriteriaInsert<T>- Specified by:
getInsertionTargetPathsin interfaceSqmInsertStatement<T>
-
setInsertionTargetPaths
Description copied from interface:JpaCriteriaInsertSets the insertion target paths.- Specified by:
setInsertionTargetPathsin interfaceJpaCriteriaInsert<T>- Specified by:
setInsertionTargetPathsin interfaceSqmInsertStatement<T>
-
setInsertionTargetPaths
Description copied from interface:JpaCriteriaInsertSets the insertion target paths.- Specified by:
setInsertionTargetPathsin interfaceJpaCriteriaInsert<T>- Specified by:
setInsertionTargetPathsin interfaceSqmInsertStatement<T>
-
addInsertTargetStateField
-
visitInsertionTargetPaths
- Specified by:
visitInsertionTargetPathsin interfaceSqmInsertStatement<T>
-
createConflictClause
Description copied from interface:JpaCriteriaInsertCreate a new conflict clause for this insert statement.- Specified by:
createConflictClausein interfaceJpaCriteriaInsert<T>- Returns:
- a new conflict clause
- See Also:
-
getConflictClause
Description copied from interface:JpaCriteriaInsertReturns the conflict clause that defines what happens when an insert violates a unique constraint, ornullif there is none.- Specified by:
getConflictClausein interfaceJpaCriteriaInsert<T>- Specified by:
getConflictClausein interfaceSqmInsertStatement<T>
-
onConflict
Description copied from interface:JpaCriteriaInsertSets the conflict clause that defines what happens when an insert violates a unique constraint.- Specified by:
onConflictin interfaceJpaCriteriaInsert<T>
-
onConflict
Description copied from interface:JpaCriteriaInsertSets the conflict clause that defines what happens when an insert violates a unique constraint.- Specified by:
onConflictin interfaceJpaCriteriaInsert<T>
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-