Class PersistentTableBulkIdStrategy
- java.lang.Object
-
- org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl>
-
- org.hibernate.hql.spi.id.persistent.PersistentTableBulkIdStrategy
-
- All Implemented Interfaces:
MultiTableBulkIdStrategy
public class PersistentTableBulkIdStrategy extends AbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl> implements MultiTableBulkIdStrategy
This is a strategy that mimics temporary tables for databases which do not support temporary tables. It follows a pattern similar to the ANSI SQL definition of global temporary table using a "session id" column to segment rows from the various sessions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl
AbstractMultiTableBulkIdStrategyImpl.PreparationContext
-
Nested classes/interfaces inherited from interface org.hibernate.hql.spi.id.MultiTableBulkIdStrategy
MultiTableBulkIdStrategy.DeleteHandler, MultiTableBulkIdStrategy.UpdateHandler
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCATALOGstatic java.lang.StringDROP_ID_TABLESstatic java.lang.StringSCHEMAstatic java.lang.StringSHORT_NAME
-
Constructor Summary
Constructors Constructor Description PersistentTableBulkIdStrategy()PersistentTableBulkIdStrategy(IdTableSupport idTableSupport)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaugmentIdTableDefinition(Table idTable)MultiTableBulkIdStrategy.DeleteHandlerbuildDeleteHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)Build a handler capable of handling the bulk delete indicated by the given walker.protected org.hibernate.hql.spi.id.persistent.IdTableInfoImplbuildIdTableInfo(PersistentClass entityBinding, Table idTable, JdbcServices jdbcServices, MetadataImplementor metadata, org.hibernate.hql.spi.id.persistent.PreparationContextImpl context, SqlStringGenerationContext sqlStringGenerationContext)protected org.hibernate.hql.spi.id.persistent.PreparationContextImplbuildPreparationContext()MultiTableBulkIdStrategy.UpdateHandlerbuildUpdateHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)Build a handler capable of handling the bulk update indicated by the given walker.protected QualifiedTableNamedetermineIdTableName(JdbcEnvironment jdbcEnvironment, PersistentClass entityBinding)protected voidfinishPreparation(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess, MetadataImplementor metadata, org.hibernate.hql.spi.id.persistent.PreparationContextImpl context)protected voidinitialize(MetadataBuildingOptions buildingOptions, SessionFactoryOptions sessionFactoryOptions)Configure ourselves.voidrelease(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess)Release the strategy.-
Methods inherited from class org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl
buildIdTableCreateStatement, buildIdTableDropStatement, formatIdTableName, getIdTableInfo, getIdTableInfo, getIdTableSupport, prepare
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.hql.spi.id.MultiTableBulkIdStrategy
prepare, prepare
-
-
-
-
Field Detail
-
SHORT_NAME
public static final java.lang.String SHORT_NAME
- See Also:
- Constant Field Values
-
DROP_ID_TABLES
public static final java.lang.String DROP_ID_TABLES
- See Also:
- Constant Field Values
-
SCHEMA
public static final java.lang.String SCHEMA
- See Also:
- Constant Field Values
-
CATALOG
public static final java.lang.String CATALOG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PersistentTableBulkIdStrategy
public PersistentTableBulkIdStrategy()
-
PersistentTableBulkIdStrategy
public PersistentTableBulkIdStrategy(IdTableSupport idTableSupport)
-
-
Method Detail
-
buildPreparationContext
protected org.hibernate.hql.spi.id.persistent.PreparationContextImpl buildPreparationContext()
- Overrides:
buildPreparationContextin classAbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl>
-
initialize
protected void initialize(MetadataBuildingOptions buildingOptions, SessionFactoryOptions sessionFactoryOptions)
Description copied from class:AbstractMultiTableBulkIdStrategyImplConfigure ourselves. By default, nothing to do; here totally for subclass hook-in- Overrides:
initializein classAbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl>- Parameters:
buildingOptions- Access to user-defined Metadata building options
-
determineIdTableName
protected QualifiedTableName determineIdTableName(JdbcEnvironment jdbcEnvironment, PersistentClass entityBinding)
- Overrides:
determineIdTableNamein classAbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl>
-
augmentIdTableDefinition
protected void augmentIdTableDefinition(Table idTable)
- Overrides:
augmentIdTableDefinitionin classAbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl>
-
buildIdTableInfo
protected org.hibernate.hql.spi.id.persistent.IdTableInfoImpl buildIdTableInfo(PersistentClass entityBinding, Table idTable, JdbcServices jdbcServices, MetadataImplementor metadata, org.hibernate.hql.spi.id.persistent.PreparationContextImpl context, SqlStringGenerationContext sqlStringGenerationContext)
- Specified by:
buildIdTableInfoin classAbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl>
-
finishPreparation
protected void finishPreparation(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess, MetadataImplementor metadata, org.hibernate.hql.spi.id.persistent.PreparationContextImpl context)
- Overrides:
finishPreparationin classAbstractMultiTableBulkIdStrategyImpl<org.hibernate.hql.spi.id.persistent.IdTableInfoImpl,org.hibernate.hql.spi.id.persistent.PreparationContextImpl>
-
buildUpdateHandler
public MultiTableBulkIdStrategy.UpdateHandler buildUpdateHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)
Description copied from interface:MultiTableBulkIdStrategyBuild a handler capable of handling the bulk update indicated by the given walker.- Specified by:
buildUpdateHandlerin interfaceMultiTableBulkIdStrategy- Parameters:
factory- The SessionFactorywalker- The AST walker, representing the update query- Returns:
- The handler
-
buildDeleteHandler
public MultiTableBulkIdStrategy.DeleteHandler buildDeleteHandler(SessionFactoryImplementor factory, org.hibernate.hql.internal.ast.HqlSqlWalker walker)
Description copied from interface:MultiTableBulkIdStrategyBuild a handler capable of handling the bulk delete indicated by the given walker.- Specified by:
buildDeleteHandlerin interfaceMultiTableBulkIdStrategy- Parameters:
factory- The SessionFactorywalker- The AST walker, representing the delete query- Returns:
- The handler
-
release
public void release(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess)
Description copied from interface:MultiTableBulkIdStrategyRelease the strategy. Called as the SessionFactory is being shut down.- Specified by:
releasein interfaceMultiTableBulkIdStrategy- Parameters:
jdbcServices- The JdbcService objectconnectionAccess- Access to the JDBC Connection
-
-