HHH-7769 - Define short-names for built-in MultiTableBulkIdStrategy impls
This commit is contained in:
parent
dffb86c52d
commit
25036b088a
|
@ -94,6 +94,9 @@ import org.hibernate.engine.transaction.jta.platform.internal.WebSphereJtaPlatfo
|
|||
import org.hibernate.engine.transaction.jta.platform.internal.WeblogicJtaPlatform;
|
||||
import org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform;
|
||||
import org.hibernate.engine.transaction.spi.TransactionFactory;
|
||||
import org.hibernate.hql.spi.MultiTableBulkIdStrategy;
|
||||
import org.hibernate.hql.spi.PersistentTableBulkIdStrategy;
|
||||
import org.hibernate.hql.spi.TemporaryTableBulkIdStrategy;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
|
@ -131,6 +134,7 @@ public class StrategySelectorBuilder {
|
|||
addDialects( strategySelector );
|
||||
addJtaPlatforms( strategySelector );
|
||||
addTransactionFactories( strategySelector );
|
||||
addMultiTableBulkIdStrategies( strategySelector );
|
||||
|
||||
// apply auto-discovered registrations
|
||||
for ( AvailabilityAnnouncer announcer : classLoaderService.loadJavaServices( AvailabilityAnnouncer.class ) ) {
|
||||
|
@ -327,4 +331,17 @@ public class StrategySelectorBuilder {
|
|||
strategySelector.registerStrategyImplementor( TransactionFactory.class, CMTTransactionFactory.SHORT_NAME, CMTTransactionFactory.class );
|
||||
strategySelector.registerStrategyImplementor( TransactionFactory.class, "org.hibernate.transaction.CMTTransactionFactory", CMTTransactionFactory.class );
|
||||
}
|
||||
|
||||
private void addMultiTableBulkIdStrategies(StrategySelectorImpl strategySelector) {
|
||||
strategySelector.registerStrategyImplementor(
|
||||
MultiTableBulkIdStrategy.class,
|
||||
PersistentTableBulkIdStrategy.SHORT_NAME,
|
||||
PersistentTableBulkIdStrategy.class
|
||||
);
|
||||
strategySelector.registerStrategyImplementor(
|
||||
MultiTableBulkIdStrategy.class,
|
||||
TemporaryTableBulkIdStrategy.SHORT_NAME,
|
||||
TemporaryTableBulkIdStrategy.class
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,8 @@ public class PersistentTableBulkIdStrategy implements MultiTableBulkIdStrategy {
|
|||
PersistentTableBulkIdStrategy.class.getName()
|
||||
);
|
||||
|
||||
public static final String SHORT_NAME = "persistent";
|
||||
|
||||
public static final String CLEAN_UP_ID_TABLES = "hibernate.hql.bulk_id_strategy.persistent.clean_up";
|
||||
public static final String SCHEMA = "hibernate.hql.bulk_id_strategy.persistent.schema";
|
||||
public static final String CATALOG = "hibernate.hql.bulk_id_strategy.persistent.catalog";
|
||||
|
|
|
@ -49,6 +49,8 @@ import org.hibernate.persister.entity.Queryable;
|
|||
public class TemporaryTableBulkIdStrategy implements MultiTableBulkIdStrategy {
|
||||
public static final TemporaryTableBulkIdStrategy INSTANCE = new TemporaryTableBulkIdStrategy();
|
||||
|
||||
public static final String SHORT_NAME = "temporary";
|
||||
|
||||
private static final CoreMessageLogger log = Logger.getMessageLogger(
|
||||
CoreMessageLogger.class,
|
||||
TemporaryTableBulkIdStrategy.class.getName()
|
||||
|
|
Loading…
Reference in New Issue