public abstract class AbstractTableBasedBulkIdHandler extends Object
MultiTableBulkIdStrategy.UpdateHandler
and MultiTableBulkIdStrategy.DeleteHandler
implementations through
TableBasedUpdateHandlerImpl
and TableBasedDeleteHandlerImpl
respectively.
Mainly supports common activities like:WHERE
clause (if one) - processWhereClause(antlr.collections.AST)
SELECT
clause for the id-table insert - generateIdInsertSelect(java.lang.String, org.hibernate.hql.spi.id.IdTableInfo, org.hibernate.hql.spi.id.AbstractTableBasedBulkIdHandler.ProcessedWhereClause)
generateIdSubselect(org.hibernate.persister.entity.Queryable, org.hibernate.hql.spi.id.IdTableInfo)
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractTableBasedBulkIdHandler.ProcessedWhereClause |
Constructor and Description |
---|
AbstractTableBasedBulkIdHandler(SessionFactoryImplementor sessionFactory,
org.hibernate.hql.internal.ast.HqlSqlWalker walker) |
public AbstractTableBasedBulkIdHandler(SessionFactoryImplementor sessionFactory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)
protected SessionFactoryImplementor factory()
protected org.hibernate.hql.internal.ast.HqlSqlWalker walker()
public abstract Queryable getTargetedQueryable()
protected AbstractTableBasedBulkIdHandler.ProcessedWhereClause processWhereClause(antlr.collections.AST whereClause)
WHERE
clause from the user-defined update/delete querywhereClause
- The user-defined WHERE
clauseWHERE
clause representationprotected String generateIdInsertSelect(String tableAlias, IdTableInfo idTableInfo, AbstractTableBasedBulkIdHandler.ProcessedWhereClause whereClause)
INSERT
-SELECT
statement for holding matching ids. This is the
INSERT
used to populate the bulk-id table with ids matching the restrictions defined in the
original WHERE
clausetableAlias
- The table alias to use for the entitywhereClause
- The processed representation for the user-defined WHERE
clause.INSERT
-SELECT
for populating the bulk-id table.public static String generateIdSelect(String tableAlias, String whereClause, Dialect dialect, Queryable queryable)
protected void addAnyExtraIdSelectValues(SelectValues selectClause)
generateIdInsertSelect(java.lang.String, org.hibernate.hql.spi.id.IdTableInfo, org.hibernate.hql.spi.id.AbstractTableBasedBulkIdHandler.ProcessedWhereClause)
to allow subclasses to define any extra
values to be selected (and therefore stored into the bulk-id table). Used to store
session identifier, e.g.selectClause
- The SelectValues that defines the select clause of the insert statement.protected String generateIdSubselect(Queryable persister, IdTableInfo idTableInfo)
protected String generateIdSubselect(Queryable persister, AbstractCollectionPersister cPersister, IdTableInfo idTableInfo)
protected static String[] getKeyColumnNames(Queryable persister, AbstractCollectionPersister cPersister)
protected static void appendJoined(String delimiter, String[] parts, StringBuilder sb)
protected void prepareForUse(Queryable persister, SharedSessionContractImplementor session)
protected void releaseFromUse(Queryable persister, SharedSessionContractImplementor session)
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.