Package org.hibernate.testing.boot
Class BootstrapContextImpl
- java.lang.Object
-
- org.hibernate.testing.boot.BootstrapContextImpl
-
- All Implemented Interfaces:
BootstrapContext
public class BootstrapContextImpl extends Object implements BootstrapContext
-
-
Constructor Summary
Constructors Constructor Description BootstrapContextImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ArchiveDescriptorFactorygetArchiveDescriptorFactory()Access to the ArchiveDescriptorFactory to be used for scanningCollection<ConverterDescriptor>getAttributeConverters()Access to collected AttributeConverter definitions.Collection<AuxiliaryDatabaseObject>getAuxiliaryDatabaseObjectList()Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder.BeanInstanceProducergetBeanInstanceProducer()Collection<CacheRegionDefinition>getCacheRegionDefinitions()Access to all explicit cache region mappings.ClassLoaderAccessgetClassLoaderAccess()ClassmateContextgetClassmateContext()Access to the shared Classmate objects used throughout Hibernate's bootstrap process.org.jboss.jandex.IndexViewgetJandexView()Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(IndexView), if any.MutableJpaCompliancegetJpaCompliance()ClassLoadergetJpaTempClassLoader()Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader(), if any.MetadataBuildingOptionsgetMetadataBuildingOptions()org.hibernate.annotations.common.reflection.ReflectionManagergetReflectionManager()Retrieve the Hibernate Commons Annotations ReflectionManager to use.ManagedTypeRepresentationResolvergetRepresentationStrategySelector()ScanEnvironmentgetScanEnvironment()Access to the environment for scanning.ObjectgetScanner()Access to the Scanner to be used for scanning.ScanOptionsgetScanOptions()Access to the options to be used for scanningStandardServiceRegistrygetServiceRegistry()Map<String,SqmFunctionDescriptor>getSqlFunctions()Access to any SQL functions explicitly registered with the MetadataBuilder.TypeConfigurationgetTypeConfiguration()booleanisJpaBootstrap()voidmarkAsJpaBootstrap()Indicates that bootstrap was initiated from JPA bootstrapping.voidregisterAdHocBasicType(BasicTypeImpl<?> basicType)To support enversvoidrelease()Releases the "bootstrap only" resources held by this BootstrapContext.<T> BasicTypeImpl<T>resolveAdHocBasicType(String key)To support envers-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.boot.spi.BootstrapContext
getIdentifierGeneratorFactory
-
-
-
-
Method Detail
-
getServiceRegistry
public StandardServiceRegistry getServiceRegistry()
- Specified by:
getServiceRegistryin interfaceBootstrapContext
-
getJpaCompliance
public MutableJpaCompliance getJpaCompliance()
- Specified by:
getJpaCompliancein interfaceBootstrapContext
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
- Specified by:
getTypeConfigurationin interfaceBootstrapContext
-
getBeanInstanceProducer
public BeanInstanceProducer getBeanInstanceProducer()
- Specified by:
getBeanInstanceProducerin interfaceBootstrapContext
-
getMetadataBuildingOptions
public MetadataBuildingOptions getMetadataBuildingOptions()
- Specified by:
getMetadataBuildingOptionsin interfaceBootstrapContext
-
isJpaBootstrap
public boolean isJpaBootstrap()
- Specified by:
isJpaBootstrapin interfaceBootstrapContext
-
markAsJpaBootstrap
public void markAsJpaBootstrap()
Description copied from interface:BootstrapContextIndicates that bootstrap was initiated from JPA bootstrapping. Internallyfalseis the assumed value. We only need to call this to mark that as true.- Specified by:
markAsJpaBootstrapin interfaceBootstrapContext
-
getJpaTempClassLoader
public ClassLoader getJpaTempClassLoader()
Description copied from interface:BootstrapContextAccess the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader(), if any.- Specified by:
getJpaTempClassLoaderin interfaceBootstrapContext- Returns:
- The tempo ClassLoader
-
getClassLoaderAccess
public ClassLoaderAccess getClassLoaderAccess()
- Specified by:
getClassLoaderAccessin interfaceBootstrapContext
-
getClassmateContext
public ClassmateContext getClassmateContext()
Description copied from interface:BootstrapContextAccess to the shared Classmate objects used throughout Hibernate's bootstrap process.- Specified by:
getClassmateContextin interfaceBootstrapContext- Returns:
- Access to the shared Classmate delegates.
-
getArchiveDescriptorFactory
public ArchiveDescriptorFactory getArchiveDescriptorFactory()
Description copied from interface:BootstrapContextAccess to the ArchiveDescriptorFactory to be used for scanning- Specified by:
getArchiveDescriptorFactoryin interfaceBootstrapContext- Returns:
- The ArchiveDescriptorFactory
-
getScanOptions
public ScanOptions getScanOptions()
Description copied from interface:BootstrapContextAccess to the options to be used for scanning- Specified by:
getScanOptionsin interfaceBootstrapContext- Returns:
- The scan options
-
getScanEnvironment
public ScanEnvironment getScanEnvironment()
Description copied from interface:BootstrapContextAccess to the environment for scanning. Consider this temporary; see discussion onScanEnvironment- Specified by:
getScanEnvironmentin interfaceBootstrapContext- Returns:
- The scan environment
-
getScanner
public Object getScanner()
Description copied from interface:BootstrapContextAccess to the Scanner to be used for scanning. Can be:- A Scanner instance
- A Class reference to the Scanner implementor
- A String naming the Scanner implementor
- Specified by:
getScannerin interfaceBootstrapContext- Returns:
- The scanner
-
getReflectionManager
public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Description copied from interface:BootstrapContextRetrieve the Hibernate Commons Annotations ReflectionManager to use.- Specified by:
getReflectionManagerin interfaceBootstrapContext- Returns:
- The Hibernate Commons Annotations ReflectionManager to use.
-
getJandexView
public org.jboss.jandex.IndexView getJandexView()
Description copied from interface:BootstrapContextAccess to the Jandex index passed by call toMetadataBuilder.applyIndexView(IndexView), if any. Note that Jandex is currently not used. See https://github.com/hibernate/hibernate-orm/wiki/Roadmap7.0- Specified by:
getJandexViewin interfaceBootstrapContext- Returns:
- The Jandex index
-
getSqlFunctions
public Map<String,SqmFunctionDescriptor> getSqlFunctions()
Description copied from interface:BootstrapContextAccess to any SQL functions explicitly registered with the MetadataBuilder. This does not include Dialect defined functions, etc. Should never returnnull- Specified by:
getSqlFunctionsin interfaceBootstrapContext- Returns:
- The SQLFunctions registered through MetadataBuilder
-
getAuxiliaryDatabaseObjectList
public Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Description copied from interface:BootstrapContextAccess to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder. This does not include AuxiliaryDatabaseObject defined in mappings. Should never returnnull- Specified by:
getAuxiliaryDatabaseObjectListin interfaceBootstrapContext- Returns:
- The AuxiliaryDatabaseObject registered through MetadataBuilder
-
getAttributeConverters
public Collection<ConverterDescriptor> getAttributeConverters()
Description copied from interface:BootstrapContextAccess to collected AttributeConverter definitions. Should never returnnull- Specified by:
getAttributeConvertersin interfaceBootstrapContext- Returns:
- The AttributeConverterInfo registered through MetadataBuilder
-
getCacheRegionDefinitions
public Collection<CacheRegionDefinition> getCacheRegionDefinitions()
Description copied from interface:BootstrapContextAccess to all explicit cache region mappings. Should never returnnull- Specified by:
getCacheRegionDefinitionsin interfaceBootstrapContext- Returns:
- Explicit cache region mappings
-
getRepresentationStrategySelector
public ManagedTypeRepresentationResolver getRepresentationStrategySelector()
- Specified by:
getRepresentationStrategySelectorin interfaceBootstrapContext
-
registerAdHocBasicType
public void registerAdHocBasicType(BasicTypeImpl<?> basicType)
Description copied from interface:BootstrapContextTo support envers- Specified by:
registerAdHocBasicTypein interfaceBootstrapContext
-
resolveAdHocBasicType
public <T> BasicTypeImpl<T> resolveAdHocBasicType(String key)
Description copied from interface:BootstrapContextTo support envers- Specified by:
resolveAdHocBasicTypein interfaceBootstrapContext
-
release
public void release()
Description copied from interface:BootstrapContextReleases the "bootstrap only" resources held by this BootstrapContext. Only one call to this method is supported, after we have completed the process of building the (non-inflight) Metadata impl. We may want to delay this until we get into SF building. Not sure yet.- Specified by:
releasein interfaceBootstrapContext
-
close
public void close()
-
-