Top Fields Constructors Methods
org.hibernate.query.sqm.mutation.internal.cte

public Class CteInsertHandler

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.AbstractMap, .ArrayList, .Collections, .List, .Map, java.util.function.BiConsumer, org.hibernate.boot.model.naming.Identifier, org.hibernate.dialect.Dialect, org.hibernate.dialect.temptable.TemporaryTable, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.id.BulkInsertionCapableIdentifierGenerator, .OptimizableGenerator, org.hibernate.id.enhanced.Optimizer, org.hibernate.internal.util.collections.CollectionHelper, .Stack, org.hibernate.metamodel.mapping.BasicValuedMapping, .EntityIdentifierMapping, .EntityMappingType, .MappingModelExpressible, .SqlExpressible, org.hibernate.persister.entity.AbstractEntityPersister, .EntityPersister, .Joinable, org.hibernate.query.SemanticException, .SortDirection, org.hibernate.query.results.TableGroupImpl, org.hibernate.query.spi.DomainQueryExecutionContext, org.hibernate.query.sqm.BinaryArithmeticOperator, .ComparisonOperator, org.hibernate.query.sqm.internal.DomainParameterXref, .SqmJdbcExecutionContextAdapter, .SqmUtil, org.hibernate.query.sqm.mutation.internal.InsertHandler, .MultiTableSqmMutationConverter, .SqmInsertStrategyHelper, org.hibernate.query.sqm.spi.SqmParameterMappingModelResolutionAccess, org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter, org.hibernate.query.sqm.sql.internal.SqmPathInterpretation, org.hibernate.query.sqm.tree.expression.SqmExpression, .SqmParameter, .SqmStar, org.hibernate.query.sqm.tree.insert.SqmInsertSelectStatement, .SqmInsertStatement, .SqmInsertValuesStatement, .SqmValues, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.SqlAstJoinType, .SqlAstTranslator, org.hibernate.sql.ast.spi.SqlAstProcessingState, org.hibernate.sql.ast.tree.Statement, org.hibernate.sql.ast.tree.cte.CteColumn, .CteContainer, .CteMaterialization, .CteStatement, .CteTable, .CteTableGroup, org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression, .ColumnReference, .Expression, .JdbcParameter, .QueryLiteral, .SelfRenderingSqlFragmentExpression, org.hibernate.sql.ast.tree.from.NamedTableReference, .TableGroup, .TableGroupJoin, .TableReference, .TableReferenceJoin, .UnionTableReference, .ValuesTableGroup, org.hibernate.sql.ast.tree.insert.InsertSelectStatement, .Values, org.hibernate.sql.ast.tree.predicate.ComparisonPredicate, org.hibernate.sql.ast.tree.select.QueryPart, .QuerySpec, .SelectStatement, .SortSpecification, org.hibernate.sql.ast.tree.update.Assignment, org.hibernate.sql.exec.spi.JdbcOperationQuerySelect, .JdbcParameterBindings, org.hibernate.sql.results.graph.DomainResult, org.hibernate.sql.results.graph.basic.BasicResult, org.hibernate.sql.results.internal.SqlSelectionImpl, org.hibernate.sql.results.spi.ListResultsConsumer, org.hibernate.generator.Generator, org.hibernate.type.spi.TypeConfiguration

Author
Christian Beikov

Field Summary

Modifier and TypeField and Description
public static final String
private final CteTable
public static final String
private final DomainParameterXref
private final EntityMappingType
public static final String
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private final SqmInsertStatement<?>

Constructor Summary

AccessConstructor and Description
public
CteInsertHandler(CteTable cteTable, SqmInsertStatement<?> sqmStatement, DomainParameterXref domainParameterXref, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected String
addDmlCtes(CteContainer statement, CteStatement queryCte, List<Map.Entry<List<CteColumn>, Assignment>> assignments, boolean assignsId, MultiTableSqmMutationConverter sqmConverter, Map<SqmParameter<?>, List<List<JdbcParameter>>> parameterResolutions, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private void
private void
protected Expression
createCountStar(SessionFactoryImplementor factory, MultiTableSqmMutationConverter sqmConverter)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public static CteTable
createCteTable(CteTable sqmCteTable, List<CteColumn> sqmCteColumns, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
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 CteTable
protected String
getCteTableName(String tableExpression)

protected String
getCteTableName(String tableExpression, String subPrefix)

public DomainParameterXref
public EntityMappingType
public SessionFactoryImplementor
getSessionFactory()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public SqmInsertStatement<?>
private TableReference
resolveTableReference(ColumnReference columnReference, TableGroup updatingTableGroup, Map<String, TableReference> tableReferenceByAlias)

protected NamedTableReference
resolveUnionTableReference(TableReference tableReference, String tableExpression)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CTE_TABLE_IDENTIFIERback to summary
public static final String CTE_TABLE_IDENTIFIER
cteTableback to summary
private final CteTable cteTable
DML_RESULT_TABLE_NAME_PREFIXback to summary
public static final String DML_RESULT_TABLE_NAME_PREFIX
domainParameterXrefback to summary
private final DomainParameterXref domainParameterXref
entityDescriptorback to summary
private final EntityMappingType entityDescriptor
ROW_NUMBERS_WITH_SEQUENCE_VALUEback to summary
public static final String ROW_NUMBERS_WITH_SEQUENCE_VALUE
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

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

sqmStatementback to summary
private final SqmInsertStatement<?> sqmStatement

Constructor Detail

CteInsertHandlerback to summary
public CteInsertHandler(CteTable cteTable, SqmInsertStatement<?> sqmStatement, DomainParameterXref domainParameterXref, SessionFactoryImplementor sessionFactory)

Deprecated

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

Method Detail

addDmlCtesback to summary
protected String addDmlCtes(CteContainer statement, CteStatement queryCte, List<Map.Entry<List<CteColumn>, Assignment>> assignments, boolean assignsId, MultiTableSqmMutationConverter sqmConverter, Map<SqmParameter<?>, List<List<JdbcParameter>>> parameterResolutions, SessionFactoryImplementor factory)

Deprecated

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

collectTableReferenceback to summary
private void collectTableReference(TableReference tableReference, BiConsumer<String, TableReference> consumer)
collectTableReferenceback to summary
private void collectTableReference(TableReferenceJoin tableReferenceJoin, BiConsumer<String, TableReference> consumer)
createCountStarback to summary
protected Expression createCountStar(SessionFactoryImplementor factory, MultiTableSqmMutationConverter sqmConverter)

Deprecated

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

createCteTableback to summary
public static CteTable createCteTable(CteTable sqmCteTable, List<CteColumn> sqmCteColumns, SessionFactoryImplementor factory)

Deprecated

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

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
getCteTableback to summary
public CteTable getCteTable()
getCteTableNameback to summary
protected String getCteTableName(String tableExpression)
getCteTableNameback to summary
protected String getCteTableName(String tableExpression, String subPrefix)
getDomainParameterXrefback to summary
public DomainParameterXref getDomainParameterXref()
getEntityDescriptorback to summary
public EntityMappingType getEntityDescriptor()
getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Deprecated

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

getSqmStatementback to summary
public SqmInsertStatement<?> getSqmStatement()
resolveTableReferenceback to summary
private TableReference resolveTableReference(ColumnReference columnReference, TableGroup updatingTableGroup, Map<String, TableReference> tableReferenceByAlias)
resolveUnionTableReferenceback to summary
protected NamedTableReference resolveUnionTableReference(TableReference tableReference, String tableExpression)