Package org.hibernate.hql.spi.id
Class AbstractMultiTableBulkIdStrategyImpl<TT extends IdTableInfo,CT extends AbstractMultiTableBulkIdStrategyImpl.PreparationContext>
- java.lang.Object
-
- org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl<TT,CT>
-
- All Implemented Interfaces:
MultiTableBulkIdStrategy
- Direct Known Subclasses:
GlobalTemporaryTableBulkIdStrategy,LocalTemporaryTableBulkIdStrategy,PersistentTableBulkIdStrategy
public abstract class AbstractMultiTableBulkIdStrategyImpl<TT extends IdTableInfo,CT extends AbstractMultiTableBulkIdStrategyImpl.PreparationContext> extends java.lang.Object implements MultiTableBulkIdStrategy
Convenience base class for MultiTableBulkIdStrategy implementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAbstractMultiTableBulkIdStrategyImpl.PreparationContext-
Nested classes/interfaces inherited from interface org.hibernate.hql.spi.id.MultiTableBulkIdStrategy
MultiTableBulkIdStrategy.DeleteHandler, MultiTableBulkIdStrategy.UpdateHandler
-
-
Constructor Summary
Constructors Constructor Description AbstractMultiTableBulkIdStrategyImpl(IdTableSupport idTableSupport)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaugmentIdTableDefinition(Table idTable)protected java.lang.StringbuildIdTableCreateStatement(Table idTable, MetadataImplementor metadata, SqlStringGenerationContext sqlStringGenerationContext)protected java.lang.StringbuildIdTableDropStatement(Table idTable, SqlStringGenerationContext sqlStringGenerationContext)protected abstract TTbuildIdTableInfo(PersistentClass entityBinding, Table idTable, JdbcServices jdbcServices, MetadataImplementor metadata, CT context, SqlStringGenerationContext sqlStringGenerationContext)protected CTbuildPreparationContext()protected QualifiedTableNamedetermineIdTableName(JdbcEnvironment jdbcEnvironment, PersistentClass entityBinding)protected voidfinishPreparation(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess, MetadataImplementor metadata, CT context)protected java.lang.StringformatIdTableName(QualifiedTableName qualifiedTableName, SqlStringGenerationContext sqlStringGenerationContext)protected TTgetIdTableInfo(java.lang.String entityName)protected TTgetIdTableInfo(Queryable targetedPersister)IdTableSupportgetIdTableSupport()protected voidinitialize(MetadataBuildingOptions buildingOptions, SessionFactoryOptions sessionFactoryOptions)Configure ourselves.voidprepare(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess, MetadataImplementor metadata, SessionFactoryOptions sessionFactoryOptions, SqlStringGenerationContext sqlStringGenerationContext)Prepare the strategy.-
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
buildDeleteHandler, buildUpdateHandler, prepare, release
-
-
-
-
Constructor Detail
-
AbstractMultiTableBulkIdStrategyImpl
public AbstractMultiTableBulkIdStrategyImpl(IdTableSupport idTableSupport)
-
-
Method Detail
-
getIdTableSupport
public IdTableSupport getIdTableSupport()
-
prepare
public final void prepare(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess, MetadataImplementor metadata, SessionFactoryOptions sessionFactoryOptions, SqlStringGenerationContext sqlStringGenerationContext)
Description copied from interface:MultiTableBulkIdStrategyPrepare the strategy. Called as the SessionFactory is being built. Intended patterns here include:- Adding tables to the passed Mappings, to be picked by by "schema management tools"
- Manually creating the tables immediately through the passed JDBC Connection access
- Specified by:
preparein interfaceMultiTableBulkIdStrategy- Parameters:
jdbcServices- The JdbcService objectconnectionAccess- Access to the JDBC Connectionmetadata- Access to the O/RM mapping information
-
buildPreparationContext
protected CT buildPreparationContext()
-
initialize
protected void initialize(MetadataBuildingOptions buildingOptions, SessionFactoryOptions sessionFactoryOptions)
Configure ourselves. By default, nothing to do; here totally for subclass hook-in- Parameters:
buildingOptions- Access to user-defined Metadata building optionssessionFactoryOptions-
-
determineIdTableName
protected QualifiedTableName determineIdTableName(JdbcEnvironment jdbcEnvironment, PersistentClass entityBinding)
-
augmentIdTableDefinition
protected void augmentIdTableDefinition(Table idTable)
-
buildIdTableInfo
protected abstract TT buildIdTableInfo(PersistentClass entityBinding, Table idTable, JdbcServices jdbcServices, MetadataImplementor metadata, CT context, SqlStringGenerationContext sqlStringGenerationContext)
-
buildIdTableCreateStatement
protected java.lang.String buildIdTableCreateStatement(Table idTable, MetadataImplementor metadata, SqlStringGenerationContext sqlStringGenerationContext)
-
buildIdTableDropStatement
protected java.lang.String buildIdTableDropStatement(Table idTable, SqlStringGenerationContext sqlStringGenerationContext)
-
formatIdTableName
protected java.lang.String formatIdTableName(QualifiedTableName qualifiedTableName, SqlStringGenerationContext sqlStringGenerationContext)
-
finishPreparation
protected void finishPreparation(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess, MetadataImplementor metadata, CT context)
-
getIdTableInfo
protected TT getIdTableInfo(java.lang.String entityName)
-
-