Removed deprecated MetadataBuildingOptions.getReflectionManager()

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
Jan Schatteman 2022-03-03 20:37:36 +01:00 committed by Steve Ebersole
parent 41016674cb
commit 8b0f70f066
5 changed files with 3 additions and 29 deletions

View File

@ -17,7 +17,6 @@ import org.hibernate.HibernateException;
import org.hibernate.TimeZoneStorageStrategy;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.TimeZoneStorageType;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.boot.CacheRegionDefinition;
import org.hibernate.boot.MetadataBuilder;
import org.hibernate.boot.MetadataSources;
@ -762,11 +761,6 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
return bootstrapContext.getTypeConfiguration();
}
@Override
public ReflectionManager getReflectionManager() {
return bootstrapContext.getReflectionManager();
}
@Override
public ImplicitNamingStrategy getImplicitNamingStrategy() {
return implicitNamingStrategy;

View File

@ -10,7 +10,6 @@ import java.util.List;
import jakarta.persistence.SharedCacheMode;
import org.hibernate.HibernateException;
import org.hibernate.TimeZoneStorageStrategy;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.boot.model.IdGeneratorStrategyInterpreter;
import org.hibernate.boot.model.naming.ImplicitNamingStrategy;
import org.hibernate.boot.model.naming.PhysicalNamingStrategy;
@ -79,11 +78,6 @@ public abstract class AbstractDelegatingMetadataBuildingOptions implements Metad
return delegate.getPhysicalNamingStrategy();
}
@Override
public ReflectionManager getReflectionManager() {
return delegate.getReflectionManager();
}
@Override
public SharedCacheMode getSharedCacheMode() {
return delegate.getSharedCacheMode();

View File

@ -11,7 +11,6 @@ import java.util.List;
import jakarta.persistence.SharedCacheMode;
import org.hibernate.TimeZoneStorageStrategy;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.boot.model.IdGeneratorStrategyInterpreter;
import org.hibernate.boot.model.naming.ImplicitNamingStrategy;
import org.hibernate.boot.model.naming.PhysicalNamingStrategy;
@ -74,20 +73,6 @@ public interface MetadataBuildingOptions {
*/
List<BasicTypeRegistration> getBasicTypeRegistrations();
/**
* Retrieve the Hibernate Commons Annotations ReflectionManager to use.
*
* @return The Hibernate Commons Annotations ReflectionManager to use.
*
* @deprecated Use {@link BootstrapContext#getReflectionManager()} instead,
* The plan is to remove first {@link MetadataBuildingOptions#getReflectionManager()}
* keeping {@link BootstrapContext#getReflectionManager()} till the migration from
* Hibernate Commons Annotations to Jandex.
*
*/
@Deprecated
ReflectionManager getReflectionManager();
ImplicitNamingStrategy getImplicitNamingStrategy();
PhysicalNamingStrategy getPhysicalNamingStrategy();

View File

@ -390,7 +390,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
//As last operation, delete all caches from ReflectionManager
//(not modelled as a listener as we want this to be last)
bootMetamodel.getMetadataBuildingOptions().getReflectionManager().reset();
bootstrapContext.getReflectionManager().reset();
this.entityNameResolver = new CoordinatingEntityNameResolver( this, getInterceptor() );
}

View File

@ -12,6 +12,7 @@ import java.util.Properties;
import java.util.concurrent.Callable;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.boot.internal.MetadataImpl;
import org.hibernate.boot.registry.classloading.spi.ClassLoadingException;
import org.hibernate.boot.registry.selector.spi.StrategySelector;
import org.hibernate.boot.spi.MetadataImplementor;
@ -180,7 +181,7 @@ public class Configuration {
// todo: there are places that need bits built from the revinfo entity configuration
// this exists here as a way to pass it down in an immutable way to any consumer of this class
final ReflectionManager reflectionManager = metadata.getMetadataBuildingOptions().getReflectionManager();
final ReflectionManager reflectionManager = metadata.getMetadataBuildingOptions().getTypeConfiguration().getMetadataBuildingContext().getBootstrapContext().getReflectionManager();
this.revisionInfo = new RevisionInfoConfiguration( this, metadata, reflectionManager );
}