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,
HqlSqlWalker walker) |
public AbstractTableBasedBulkIdHandler(SessionFactoryImplementor sessionFactory, HqlSqlWalker walker)
protected SessionFactoryImplementor factory()
protected HqlSqlWalker walker()
public abstract Queryable getTargetedQueryable()
protected JDBCException convert(SQLException e, String message, String sql)
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.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 void prepareForUse(Queryable persister, SessionImplementor session)
protected void releaseFromUse(Queryable persister, SessionImplementor session)
Copyright © 2017 JBoss by Red Hat. All rights reserved.