HHH-7769 - Define short-names for built-in MultiTableBulkIdStrategy impls
This commit is contained in:
parent
0ef75629b9
commit
0251d13adc
|
@ -384,7 +384,14 @@ public class SettingsFactory implements Serializable {
|
|||
strategyClass = (Class) setting;
|
||||
}
|
||||
else {
|
||||
strategyClass = classLoaderService.classForName( setting.toString() );
|
||||
final String settingStr = setting.toString();
|
||||
if ( PersistentTableBulkIdStrategy.SHORT_NAME.equals( settingStr ) ) {
|
||||
return new PersistentTableBulkIdStrategy();
|
||||
}
|
||||
else if ( TemporaryTableBulkIdStrategy.SHORT_NAME.equals( settingStr ) ) {
|
||||
return TemporaryTableBulkIdStrategy.INSTANCE;
|
||||
}
|
||||
strategyClass = classLoaderService.classForName( settingStr );
|
||||
}
|
||||
try {
|
||||
return (MultiTableBulkIdStrategy) strategyClass.newInstance();
|
||||
|
|
|
@ -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