HHH-12904 Removing some dead code in InFlightMetadataCollectorImpl and MetadataImpl
This commit is contained in:
parent
35b4d81cf4
commit
4a4ecc434b
|
@ -56,8 +56,6 @@ import org.hibernate.boot.spi.InFlightMetadataCollector;
|
|||
import org.hibernate.boot.spi.MetadataBuildingContext;
|
||||
import org.hibernate.boot.spi.MetadataBuildingOptions;
|
||||
import org.hibernate.boot.spi.NaturalIdUniqueKeyBinder;
|
||||
import org.hibernate.cache.cfg.internal.DomainDataRegionConfigImpl.Builder;
|
||||
import org.hibernate.cache.spi.access.AccessType;
|
||||
import org.hibernate.cfg.AnnotatedClassType;
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.cfg.CopyIdentifierComponentSecondPass;
|
||||
|
@ -147,8 +145,6 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
|
|||
private final Map<String, FetchProfile> fetchProfileMap = new HashMap<>();
|
||||
private final Map<String, IdentifierGeneratorDefinition> idGeneratorDefinitionMap = new HashMap<>();
|
||||
|
||||
private final Map<String, Builder> regionConfigBuilders = new ConcurrentHashMap<>();
|
||||
|
||||
private Map<String, SQLFunction> sqlFunctionMap;
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -297,27 +293,6 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
|
|||
throw new DuplicateMappingException( DuplicateMappingException.Type.ENTITY, entityName );
|
||||
}
|
||||
entityBindingMap.put( entityName, persistentClass );
|
||||
|
||||
final AccessType accessType = AccessType.fromExternalName( persistentClass.getCacheConcurrencyStrategy() );
|
||||
if ( accessType != null ) {
|
||||
if ( persistentClass.isCached() ) {
|
||||
locateCacheRegionConfigBuilder( persistentClass.getRootClass().getCacheRegionName() ).addEntityConfig(
|
||||
persistentClass,
|
||||
accessType
|
||||
);
|
||||
}
|
||||
|
||||
if ( persistentClass.hasNaturalId() && persistentClass instanceof RootClass && persistentClass.getNaturalIdCacheRegionName() != null ) {
|
||||
locateCacheRegionConfigBuilder( persistentClass.getNaturalIdCacheRegionName() ).addNaturalIdConfig(
|
||||
(RootClass) persistentClass,
|
||||
accessType
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Builder locateCacheRegionConfigBuilder(String regionName) {
|
||||
return regionConfigBuilders.computeIfAbsent( regionName, Builder::new );
|
||||
}
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -340,14 +315,6 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
|
|||
throw new DuplicateMappingException( DuplicateMappingException.Type.COLLECTION, collectionRole );
|
||||
}
|
||||
collectionBindingMap.put( collectionRole, collection );
|
||||
|
||||
final AccessType accessType = AccessType.fromExternalName( collection.getCacheConcurrencyStrategy() );
|
||||
if ( accessType != null ) {
|
||||
locateCacheRegionConfigBuilder( collection.getCacheRegionName() ).addCollectionConfig(
|
||||
collection,
|
||||
accessType
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -2260,7 +2227,6 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
|
|||
sqlResultSetMappingMap,
|
||||
namedEntityGraphMap,
|
||||
sqlFunctionMap,
|
||||
regionConfigBuilders.values(),
|
||||
getDatabase(),
|
||||
bootstrapContext
|
||||
);
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.hibernate.boot.spi.BootstrapContext;
|
|||
import org.hibernate.boot.spi.MetadataBuildingOptions;
|
||||
import org.hibernate.boot.spi.MetadataImplementor;
|
||||
import org.hibernate.boot.spi.SessionFactoryBuilderFactory;
|
||||
import org.hibernate.cache.cfg.internal.DomainDataRegionConfigImpl;
|
||||
import org.hibernate.cfg.annotations.NamedEntityGraphDefinition;
|
||||
import org.hibernate.cfg.annotations.NamedProcedureCallDefinition;
|
||||
import org.hibernate.dialect.function.SQLFunction;
|
||||
|
@ -80,7 +79,6 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
|
|||
private final Map<String, ResultSetMappingDefinition> sqlResultSetMappingMap;
|
||||
private final Map<String, NamedEntityGraphDefinition> namedEntityGraphMap;
|
||||
private final Map<String, SQLFunction> sqlFunctionMap;
|
||||
private final java.util.Collection<DomainDataRegionConfigImpl.Builder> cacheRegionConfigBuilders;
|
||||
private final Database database;
|
||||
|
||||
MetadataImpl(
|
||||
|
@ -101,7 +99,6 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
|
|||
Map<String, ResultSetMappingDefinition> sqlResultSetMappingMap,
|
||||
Map<String, NamedEntityGraphDefinition> namedEntityGraphMap,
|
||||
Map<String, SQLFunction> sqlFunctionMap,
|
||||
java.util.Collection<DomainDataRegionConfigImpl.Builder> cacheRegionConfigBuilders,
|
||||
Database database,
|
||||
BootstrapContext bootstrapContext) {
|
||||
this.uuid = uuid;
|
||||
|
@ -121,7 +118,6 @@ public class MetadataImpl implements MetadataImplementor, Serializable {
|
|||
this.sqlResultSetMappingMap = sqlResultSetMappingMap;
|
||||
this.namedEntityGraphMap = namedEntityGraphMap;
|
||||
this.sqlFunctionMap = sqlFunctionMap;
|
||||
this.cacheRegionConfigBuilders = cacheRegionConfigBuilders;
|
||||
this.database = database;
|
||||
this.bootstrapContext = bootstrapContext;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue