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>, org.hibernate.query.sqm.internal.ParameterCollector, SqmCteContainer, SqmInsertStatement<T>, SqmCacheable, 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 SqmStatement
SqmStatement.ParameterResolutions -
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, @Nullable Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target, @Nullable List<SqmPath<?>> insertionTargetPaths, @Nullable SqmConflictClause<T> conflictClause) protectedAbstractSqmInsertStatement(SqmRoot<T> targetRoot, SqmQuerySource querySource, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInsertTargetStateField(SqmPath<?> stateField) voidappendHqlString(StringBuilder hql, SqmRenderContext context) intcopyInsertionTargetPaths(SqmCopyContext context) Create a new conflict clause for this insert statement.boolean@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.inthashCode()booleanisCompatible(Object object) 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(@Nullable 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 AbstractSqmDmlStatement
appendHqlCteString, copyCteStatements, getCteCriteria, getCteCriterias, getCteStatement, getCteStatements, getTarget, putAllCtes, subquery, validate, 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
getParameters, subqueryMethods inherited from interface JpaCriteriaBase
getRestriction, subqueryMethods 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 SqmInsertStatement
copyMethods inherited from interface SqmNode
asLoggableText, nodeBuilderMethods inherited from interface SqmQuery
generateAliasMethods inherited from interface SqmStatement
getQuerySource, getSqmParameters, resolveParametersMethods inherited from interface SqmVisitableNode
accept, toHqlString
-
Constructor Details
-
AbstractSqmInsertStatement
protected AbstractSqmInsertStatement(SqmRoot<T> targetRoot, SqmQuerySource querySource, NodeBuilder nodeBuilder) -
AbstractSqmInsertStatement
protected AbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, @Nullable Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<T> target, @Nullable List<SqmPath<?>> insertionTargetPaths, @Nullable 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
public SqmInsertStatement<T> setInsertionTargetPaths(@Nullable List<? extends Path<?>> insertionTargetPaths) 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
-
equals
- Overrides:
equalsin classAbstractSqmDmlStatement<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractSqmDmlStatement<T>
-
isCompatible
- Specified by:
isCompatiblein interfaceSqmCacheable- Overrides:
isCompatiblein classAbstractSqmDmlStatement<T>
-
cacheHashCode
public int cacheHashCode()- Specified by:
cacheHashCodein interfaceSqmCacheable- Overrides:
cacheHashCodein classAbstractSqmDmlStatement<T>
-