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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.query.sqm.tree.SqmStatement
SqmStatement.ParameterResolutions
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String,SqmCteStatement<?>> cteStatements, SqmRoot<T> target, List<SqmPath<?>> insertionTargetPaths)
Deprecated, for removal: This API element is subject to removal in a future version.protected
AbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String,SqmCteStatement<?>> cteStatements, SqmRoot<T> target, List<SqmPath<?>> insertionTargetPaths, SqmConflictClause<T> conflictClause)
protected
AbstractSqmInsertStatement(SqmQuerySource querySource, NodeBuilder nodeBuilder)
protected
AbstractSqmInsertStatement(SqmRoot<T> targetRoot, SqmQuerySource querySource, NodeBuilder nodeBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInsertTargetStateField(SqmPath<?> stateField)
void
appendHqlString(StringBuilder sb)
protected List<SqmPath<?>>
copyInsertionTargetPaths(SqmCopyContext context)
SqmConflictClause<T>
createConflictClause()
Create a new conflict clause for this insert statement.@Nullable SqmConflictClause<T>
getConflictClause()
Returns the conflict clause that defines what happens when an insert violates a unique constraint, ornull
if there is none.List<SqmPath<?>>
getInsertionTargetPaths()
Returns the insertion target paths.JpaConflictClause<T>
onConflict()
Sets the conflict clause that defines what happens when an insert violates a unique constraint.JpaCriteriaInsert<T>
onConflict(@Nullable JpaConflictClause<T> conflictClause)
Sets the conflict clause that defines what happens when an insert violates a unique constraint.SqmInsertStatement<T>
setInsertionTargetPaths(Path<?>... insertionTargetPaths)
Sets the insertion target paths.SqmInsertStatement<T>
setInsertionTargetPaths(List<? extends Path<?>> insertionTargetPaths)
Sets the insertion target paths.void
setTarget(JpaRoot<T> root)
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, 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 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 Detail
-
AbstractSqmInsertStatement
protected AbstractSqmInsertStatement(SqmQuerySource querySource, NodeBuilder nodeBuilder)
-
AbstractSqmInsertStatement
protected AbstractSqmInsertStatement(SqmRoot<T> targetRoot, SqmQuerySource querySource, NodeBuilder nodeBuilder)
-
AbstractSqmInsertStatement
@Deprecated(forRemoval=true) protected AbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String,SqmCteStatement<?>> cteStatements, SqmRoot<T> target, List<SqmPath<?>> insertionTargetPaths)
Deprecated, for removal: This API element is subject to removal in a future version.
-
AbstractSqmInsertStatement
protected AbstractSqmInsertStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String,SqmCteStatement<?>> cteStatements, SqmRoot<T> target, List<SqmPath<?>> insertionTargetPaths, SqmConflictClause<T> conflictClause)
-
-
Method Detail
-
copyInsertionTargetPaths
protected List<SqmPath<?>> copyInsertionTargetPaths(SqmCopyContext context)
-
verifyInsertTypesMatch
protected void verifyInsertTypesMatch(List<SqmPath<?>> insertionTargetPaths, List<? extends SqmTypedNode<?>> expressions)
-
setTarget
public void setTarget(JpaRoot<T> root)
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
public List<SqmPath<?>> getInsertionTargetPaths()
Description copied from interface:JpaCriteriaInsert
Returns the insertion target paths.- Specified by:
getInsertionTargetPaths
in interfaceJpaCriteriaInsert<T>
- Specified by:
getInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
setInsertionTargetPaths
public SqmInsertStatement<T> setInsertionTargetPaths(Path<?>... insertionTargetPaths)
Description copied from interface:JpaCriteriaInsert
Sets the insertion target paths.- Specified by:
setInsertionTargetPaths
in interfaceJpaCriteriaInsert<T>
- Specified by:
setInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
setInsertionTargetPaths
public SqmInsertStatement<T> setInsertionTargetPaths(List<? extends Path<?>> insertionTargetPaths)
Description copied from interface:JpaCriteriaInsert
Sets the insertion target paths.- Specified by:
setInsertionTargetPaths
in interfaceJpaCriteriaInsert<T>
- Specified by:
setInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
addInsertTargetStateField
public void addInsertTargetStateField(SqmPath<?> stateField)
-
visitInsertionTargetPaths
public void visitInsertionTargetPaths(Consumer<SqmPath<?>> consumer)
- Specified by:
visitInsertionTargetPaths
in interfaceSqmInsertStatement<T>
-
createConflictClause
public SqmConflictClause<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:
JpaCriteriaInsert.onConflict(JpaConflictClause)
-
getConflictClause
public @Nullable SqmConflictClause<T> 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
public JpaConflictClause<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
public JpaCriteriaInsert<T> onConflict(@Nullable JpaConflictClause<T> conflictClause)
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
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
-
-