public abstract class AbstractTableBasedBulkIdHandler
extends java.lang.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) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAnyExtraIdSelectValues(SelectValues selectClause)
Used from
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). |
protected JDBCException |
convert(java.sql.SQLException e,
java.lang.String message,
java.lang.String sql) |
protected SessionFactoryImplementor |
factory() |
protected java.lang.String |
generateIdInsertSelect(java.lang.String tableAlias,
IdTableInfo idTableInfo,
AbstractTableBasedBulkIdHandler.ProcessedWhereClause whereClause)
Generate the
INSERT -SELECT statement for holding matching ids. |
protected java.lang.String |
generateIdSubselect(Queryable persister,
IdTableInfo idTableInfo) |
abstract Queryable |
getTargetedQueryable() |
protected void |
prepareForUse(Queryable persister,
SessionImplementor session) |
protected AbstractTableBasedBulkIdHandler.ProcessedWhereClause |
processWhereClause(antlr.collections.AST whereClause)
Interprets the
WHERE clause from the user-defined update/delete query |
protected void |
releaseFromUse(Queryable persister,
SessionImplementor session) |
protected HqlSqlWalker |
walker() |
public AbstractTableBasedBulkIdHandler(SessionFactoryImplementor sessionFactory, HqlSqlWalker walker)
protected SessionFactoryImplementor factory()
protected HqlSqlWalker walker()
public abstract Queryable getTargetedQueryable()
protected JDBCException convert(java.sql.SQLException e, java.lang.String message, java.lang.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 java.lang.String generateIdInsertSelect(java.lang.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 java.lang.String generateIdSubselect(Queryable persister, IdTableInfo idTableInfo)
protected void prepareForUse(Queryable persister, SessionImplementor session)
protected void releaseFromUse(Queryable persister, SessionImplementor session)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.