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 void
close()
ArchiveDescriptorFactory
getArchiveDescriptorFactory()
Access to theArchiveDescriptorFactory
used for scanning.Collection<ConverterDescriptor>
getAttributeConverters()
Access to collectedAttributeConverter
definitions.Collection<AuxiliaryDatabaseObject>
getAuxiliaryDatabaseObjectList()
Access to anyAuxiliaryDatabaseObject
s explicitly registered with theMetadataBuilder
.Collection<CacheRegionDefinition>
getCacheRegionDefinitions()
Access to all explicit cache region mappings.ClassLoaderAccess
getClassLoaderAccess()
Access to class loading capabilities.ClassmateContext
getClassmateContext()
Access to the sharedClassmateContext
object used throughout the bootstrap process.BeanInstanceProducer
getCustomTypeProducer()
TheBeanInstanceProducer
to use when creating custom type references.SqmFunctionRegistry
getFunctionRegistry()
TheSqmFunctionRegistry
belonging to thisBootstrapContext
.org.jboss.jandex.IndexView
getJandexView()
Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(IndexView)
, if any.MutableJpaCompliance
getJpaCompliance()
In-flight form ofJpaCompliance
ClassLoader
getJpaTempClassLoader()
Access the temporaryClassLoader
passed to us, as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.MetadataBuildingOptions
getMetadataBuildingOptions()
Options specific to building the boot metamodelorg.hibernate.annotations.common.reflection.ReflectionManager
getReflectionManager()
Retrieve the Hibernate Commons AnnotationsReflectionManager
.ManagedTypeRepresentationResolver
getRepresentationStrategySelector()
ScanEnvironment
getScanEnvironment()
Access to the environment for scanning.Object
getScanner()
Access to theScanner
to be used for scanning.ScanOptions
getScanOptions()
Access to the options to be used for scanning.StandardServiceRegistry
getServiceRegistry()
The service registry available to bootstrappingMap<String,SqmFunctionDescriptor>
getSqlFunctions()
Access to any SQL functions explicitly registered with theMetadataBuilder
.TypeConfiguration
getTypeConfiguration()
TheTypeConfiguration
belonging to thisBootstrapContext
.boolean
isJpaBootstrap()
Whether the bootstrap was initiated from JPA bootstrapping.void
markAsJpaBootstrap()
Indicates that bootstrap was initiated from JPA bootstrapping.void
registerAdHocBasicType(BasicType<?> basicType)
To support Envers.void
release()
Releases the "bootstrap only" resources held by thisBootstrapContext
.<T> BasicType<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()
Description copied from interface:BootstrapContext
The service registry available to bootstrapping- Specified by:
getServiceRegistry
in interfaceBootstrapContext
-
getJpaCompliance
public MutableJpaCompliance getJpaCompliance()
Description copied from interface:BootstrapContext
In-flight form ofJpaCompliance
- Specified by:
getJpaCompliance
in interfaceBootstrapContext
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
Description copied from interface:BootstrapContext
TheTypeConfiguration
belonging to thisBootstrapContext
.- Specified by:
getTypeConfiguration
in interfaceBootstrapContext
- See Also:
TypeConfiguration
-
getFunctionRegistry
public SqmFunctionRegistry getFunctionRegistry()
Description copied from interface:BootstrapContext
TheSqmFunctionRegistry
belonging to thisBootstrapContext
.- Specified by:
getFunctionRegistry
in interfaceBootstrapContext
- See Also:
SqmFunctionRegistry
-
getCustomTypeProducer
public BeanInstanceProducer getCustomTypeProducer()
Description copied from interface:BootstrapContext
TheBeanInstanceProducer
to use when creating custom type references.- Specified by:
getCustomTypeProducer
in interfaceBootstrapContext
-
getMetadataBuildingOptions
public MetadataBuildingOptions getMetadataBuildingOptions()
Description copied from interface:BootstrapContext
Options specific to building the boot metamodel- Specified by:
getMetadataBuildingOptions
in interfaceBootstrapContext
-
isJpaBootstrap
public boolean isJpaBootstrap()
Description copied from interface:BootstrapContext
Whether the bootstrap was initiated from JPA bootstrapping.- Specified by:
isJpaBootstrap
in interfaceBootstrapContext
- See Also:
BootstrapContext.markAsJpaBootstrap()
-
markAsJpaBootstrap
public void markAsJpaBootstrap()
Description copied from interface:BootstrapContext
Indicates that bootstrap was initiated from JPA bootstrapping.- Specified by:
markAsJpaBootstrap
in interfaceBootstrapContext
-
getJpaTempClassLoader
public ClassLoader getJpaTempClassLoader()
Description copied from interface:BootstrapContext
Access the temporaryClassLoader
passed to us, as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.- Specified by:
getJpaTempClassLoader
in interfaceBootstrapContext
- Returns:
- The temporary
ClassLoader
-
getClassLoaderAccess
public ClassLoaderAccess getClassLoaderAccess()
Description copied from interface:BootstrapContext
Access to class loading capabilities.- Specified by:
getClassLoaderAccess
in interfaceBootstrapContext
-
getClassmateContext
public ClassmateContext getClassmateContext()
Description copied from interface:BootstrapContext
Access to the sharedClassmateContext
object used throughout the bootstrap process.- Specified by:
getClassmateContext
in interfaceBootstrapContext
- Returns:
- Access to the shared
ClassmateContext
delegates.
-
getArchiveDescriptorFactory
public ArchiveDescriptorFactory getArchiveDescriptorFactory()
Description copied from interface:BootstrapContext
Access to theArchiveDescriptorFactory
used for scanning.- Specified by:
getArchiveDescriptorFactory
in interfaceBootstrapContext
- Returns:
- The
ArchiveDescriptorFactory
-
getScanOptions
public ScanOptions getScanOptions()
Description copied from interface:BootstrapContext
Access to the options to be used for scanning.- Specified by:
getScanOptions
in interfaceBootstrapContext
- Returns:
- The scan options
-
getScanEnvironment
public ScanEnvironment getScanEnvironment()
Description copied from interface:BootstrapContext
Access to the environment for scanning.- Specified by:
getScanEnvironment
in interfaceBootstrapContext
- Returns:
- The scan environment
-
getScanner
public Object getScanner()
Description copied from interface:BootstrapContext
Access to theScanner
to be used for scanning.Can be:
- An instance of
Scanner
, - a
Class
reference to theScanner
implementor, or - a string naming the
Scanner
implementor.
- Specified by:
getScanner
in interfaceBootstrapContext
- Returns:
- The scanner
- An instance of
-
getReflectionManager
public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Description copied from interface:BootstrapContext
Retrieve the Hibernate Commons AnnotationsReflectionManager
.- Specified by:
getReflectionManager
in interfaceBootstrapContext
-
getJandexView
public org.jboss.jandex.IndexView getJandexView()
Description copied from interface:BootstrapContext
Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(IndexView)
, if any.- Specified by:
getJandexView
in interfaceBootstrapContext
- Returns:
- The Jandex index
-
getSqlFunctions
public Map<String,SqmFunctionDescriptor> getSqlFunctions()
Description copied from interface:BootstrapContext
Access to any SQL functions explicitly registered with theMetadataBuilder
. This does not includeDialect
-registered functions.Should never return
null
.- Specified by:
getSqlFunctions
in interfaceBootstrapContext
- Returns:
- The
SqmFunctionDescriptor
s registered viaMetadataBuilder
-
getAuxiliaryDatabaseObjectList
public Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Description copied from interface:BootstrapContext
Access to anyAuxiliaryDatabaseObject
s explicitly registered with theMetadataBuilder
. This does not includeAuxiliaryDatabaseObject
s defined in mappings.Should never return
null
.- Specified by:
getAuxiliaryDatabaseObjectList
in interfaceBootstrapContext
- Returns:
- The
AuxiliaryDatabaseObject
s registered viaMetadataBuilder
-
getAttributeConverters
public Collection<ConverterDescriptor> getAttributeConverters()
Description copied from interface:BootstrapContext
Access to collectedAttributeConverter
definitions.Should never return
null
.- Specified by:
getAttributeConverters
in interfaceBootstrapContext
- Returns:
- The
ConverterDescriptor
s registered viaMetadataBuilder
-
getCacheRegionDefinitions
public Collection<CacheRegionDefinition> getCacheRegionDefinitions()
Description copied from interface:BootstrapContext
Access to all explicit cache region mappings.Should never return
null
.- Specified by:
getCacheRegionDefinitions
in interfaceBootstrapContext
- Returns:
- Explicit cache region mappings
-
getRepresentationStrategySelector
public ManagedTypeRepresentationResolver getRepresentationStrategySelector()
- Specified by:
getRepresentationStrategySelector
in interfaceBootstrapContext
- See Also:
ManagedTypeRepresentationResolver
-
registerAdHocBasicType
public void registerAdHocBasicType(BasicType<?> basicType)
Description copied from interface:BootstrapContext
To support Envers.- Specified by:
registerAdHocBasicType
in interfaceBootstrapContext
-
resolveAdHocBasicType
public <T> BasicType<T> resolveAdHocBasicType(String key)
Description copied from interface:BootstrapContext
To support Envers.- Specified by:
resolveAdHocBasicType
in interfaceBootstrapContext
-
release
public void release()
Description copied from interface:BootstrapContext
Releases the "bootstrap only" resources held by thisBootstrapContext
.- Specified by:
release
in interfaceBootstrapContext
-
close
public void close()
-
-