Top Inners Fields Constructors Methods
org.hibernate.query.sqm.mutation.internal.temptable

public Class TableBasedInsertHandler

extends Object
implements InsertHandler
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.mutation.internal.InsertHandler, org.hibernate.query.sqm.mutation.internal.Handler
Imports
java.util.ArrayList, .Collections, .IdentityHashMap, .LinkedHashMap, .List, .Map, java.util.function.BiConsumer, .Function, org.hibernate.dialect.temptable.TemporaryTable, .TemporaryTableColumn, .TemporaryTableSessionUidColumn, org.hibernate.engine.spi.SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.generator.Generator, org.hibernate.id.OptimizableGenerator, org.hibernate.id.enhanced.Optimizer, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.metamodel.mapping.MappingModelExpressible, org.hibernate.persister.entity.EntityPersister, org.hibernate.query.spi.DomainQueryExecutionContext, org.hibernate.query.sqm.internal.DomainParameterXref, .SqmJdbcExecutionContextAdapter, org.hibernate.query.sqm.mutation.internal.InsertHandler, .MultiTableSqmMutationConverter, .SqmInsertStrategyHelper, org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter, org.hibernate.query.sqm.tree.expression.SqmParameter, org.hibernate.query.sqm.tree.insert.SqmInsertSelectStatement, .SqmInsertStatement, .SqmInsertValuesStatement, .SqmValues, org.hibernate.sql.ast.tree.expression.ColumnReference, .Expression, .JdbcParameter, .QueryLiteral, org.hibernate.sql.ast.tree.from.NamedTableReference, .TableGroup, .TableReference, .TableReferenceJoin, org.hibernate.sql.ast.tree.insert.InsertSelectStatement, .Values, org.hibernate.sql.ast.tree.select.QueryPart, org.hibernate.sql.ast.tree.update.Assignment, org.hibernate.sql.exec.internal.JdbcParameterImpl, org.hibernate.sql.exec.spi.ExecutionContext, org.hibernate.sql.results.internal.SqlSelectionImpl, org.hibernate.type.BasicType, org.jboss.logging.Logger

Author
Christian Beikov

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
private final AfterUseAction
private final DomainParameterXref
private final TemporaryTable
private static final Logger
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private final Function<SharedSessionContractImplementor, String>
private final JdbcParameter
private final SqmInsertStatement<?>

Constructor Summary

AccessConstructor and Description
public
TableBasedInsertHandler(SqmInsertStatement<?> sqmInsert, DomainParameterXref domainParameterXref, TemporaryTable entityTable, AfterUseAction afterUseAction, Function<SharedSessionContractImplementor, String> sessionUidAccess, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected TableBasedInsertHandler.ExecutionDelegate
buildExecutionDelegate(SqmInsertStatement<?> sqmInsert, MultiTableSqmMutationConverter sqmConverter, TemporaryTable entityTable, AfterUseAction afterUseAction, Function<SharedSessionContractImplementor, String> sessionUidAccess, DomainParameterXref domainParameterXref, TableGroup insertingTableGroup, Map<String, TableReference> tableReferenceByAlias, List<Assignment> assignments, InsertSelectStatement insertStatement, Map<SqmParameter<?>, List<List<JdbcParameter>>> parameterResolutions, JdbcParameter sessionUidParameter, Map<SqmParameter<?>, MappingModelExpressible<?>> paramTypeResolutions, DomainQueryExecutionContext executionContext)

For Hibernate Reactive

private void
private void
public int
execute(DomainQueryExecutionContext
Contextual information needed for execution
executionContext
)

Implements org.hibernate.query.sqm.mutation.internal.Handler.execute.

Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.
public SqmInsertStatement<?>
protected TableBasedInsertHandler.ExecutionDelegate
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

afterUseActionback to summary
private final AfterUseAction afterUseAction
domainParameterXrefback to summary
private final DomainParameterXref domainParameterXref
entityTableback to summary
private final TemporaryTable entityTable
logback to summary
private static final Logger log
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

sessionUidAccessback to summary
private final Function<SharedSessionContractImplementor, String> sessionUidAccess
sessionUidParameterback to summary
private final JdbcParameter sessionUidParameter
sqmInsertStatementback to summary
private final SqmInsertStatement<?> sqmInsertStatement

Constructor Detail

TableBasedInsertHandlerback to summary
public TableBasedInsertHandler(SqmInsertStatement<?> sqmInsert, DomainParameterXref domainParameterXref, TemporaryTable entityTable, AfterUseAction afterUseAction, Function<SharedSessionContractImplementor, String> sessionUidAccess, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

buildExecutionDelegateback to summary
protected TableBasedInsertHandler.ExecutionDelegate buildExecutionDelegate(SqmInsertStatement<?> sqmInsert, MultiTableSqmMutationConverter sqmConverter, TemporaryTable entityTable, AfterUseAction afterUseAction, Function<SharedSessionContractImplementor, String> sessionUidAccess, DomainParameterXref domainParameterXref, TableGroup insertingTableGroup, Map<String, TableReference> tableReferenceByAlias, List<Assignment> assignments, InsertSelectStatement insertStatement, Map<SqmParameter<?>, List<List<JdbcParameter>>> parameterResolutions, JdbcParameter sessionUidParameter, Map<SqmParameter<?>, MappingModelExpressible<?>> paramTypeResolutions, DomainQueryExecutionContext executionContext)

For Hibernate Reactive

collectTableReferenceback to summary
private void collectTableReference(TableReference tableReference, BiConsumer<String, TableReference> consumer)
collectTableReferenceback to summary
private void collectTableReference(TableReferenceJoin tableReferenceJoin, BiConsumer<String, TableReference> consumer)
executeback to summary
public int execute(DomainQueryExecutionContext executionContext)

Implements org.hibernate.query.sqm.mutation.internal.Handler.execute.

Doc from org.hibernate.query.sqm.mutation.internal.Handler.execute.

Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.

Parameters
executionContext:DomainQueryExecutionContext

Contextual information needed for execution

Returns:int

The "number of rows affected" count

Annotations
@Override
getSqmInsertStatementback to summary
public SqmInsertStatement<?> getSqmInsertStatement()
resolveDelegateback to summary
protected TableBasedInsertHandler.ExecutionDelegate resolveDelegate(DomainQueryExecutionContext executionContext)
org.hibernate.query.sqm.mutation.internal.temptable back to summary

public Interface TableBasedInsertHandler.ExecutionDelegate

Known Direct Implementers
org.hibernate.query.sqm.mutation.internal.temptable.InsertExecutionDelegate

Method Summary

Modifier and TypeMethod and Description
public int
execute(ExecutionContext executionContext)

Method Detail

executeback to summary
public int execute(ExecutionContext executionContext)