Package org.hibernate.boot.spi
Interface BootstrapContext
-
- All Known Implementing Classes:
BootstrapContextImpl
,BootstrapContextImpl
public interface BootstrapContext
Defines a context for things generally available to the process of bootstrapping a SessionFactory that are expected to be released after the SessionFactory is built.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ArchiveDescriptorFactory
getArchiveDescriptorFactory()
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.Collection<CacheRegionDefinition>
getCacheRegionDefinitions()
Access to all explicit cache region mappings.ClassLoaderAccess
getClassLoaderAccess()
Access to class loading capabilitiesClassmateContext
getClassmateContext()
Access to the shared Classmate objects used throughout Hibernate's bootstrap process.BeanInstanceProducer
getCustomTypeProducer()
BeanInstanceProducer to use when creating custom type references.default IdentifierGeneratorFactory
getIdentifierGeneratorFactory()
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 temporary ClassLoader 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 Annotations ReflectionManager to use.ManagedTypeRepresentationResolver
getRepresentationStrategySelector()
ScanEnvironment
getScanEnvironment()
Access to the environment for scanning.Object
getScanner()
Access to the Scanner to be used for scanning.ScanOptions
getScanOptions()
Access to the options to be used for scanningStandardServiceRegistry
getServiceRegistry()
The service-registry available to bootstrappingMap<String,SqmFunctionDescriptor>
getSqlFunctions()
Access to any SQL functions explicitly registered with the MetadataBuilder.TypeConfiguration
getTypeConfiguration()
boolean
isJpaBootstrap()
Whether the bootstrap was initiated from JPA bootstrapping.void
markAsJpaBootstrap()
Indicates that bootstrap was initiated from JPA bootstrapping.void
registerAdHocBasicType(BasicTypeImpl<?> basicType)
To support enversvoid
release()
Releases the "bootstrap only" resources held by this BootstrapContext.<T> BasicTypeImpl<T>
resolveAdHocBasicType(String key)
To support envers
-
-
-
Method Detail
-
getServiceRegistry
StandardServiceRegistry getServiceRegistry()
The service-registry available to bootstrapping
-
getJpaCompliance
MutableJpaCompliance getJpaCompliance()
In-flight form ofJpaCompliance
-
getTypeConfiguration
TypeConfiguration getTypeConfiguration()
- See Also:
TypeConfiguration
-
getCustomTypeProducer
BeanInstanceProducer getCustomTypeProducer()
BeanInstanceProducer to use when creating custom type references.
-
getMetadataBuildingOptions
MetadataBuildingOptions getMetadataBuildingOptions()
Options specific to building the boot metamodel
-
getIdentifierGeneratorFactory
default IdentifierGeneratorFactory getIdentifierGeneratorFactory()
-
isJpaBootstrap
boolean isJpaBootstrap()
Whether the bootstrap was initiated from JPA bootstrapping.- See Also:
markAsJpaBootstrap()
-
markAsJpaBootstrap
void markAsJpaBootstrap()
Indicates that bootstrap was initiated from JPA bootstrapping.
-
getJpaTempClassLoader
ClassLoader getJpaTempClassLoader()
Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.- Returns:
- The tempo ClassLoader
-
getClassLoaderAccess
ClassLoaderAccess getClassLoaderAccess()
Access to class loading capabilities
-
getClassmateContext
ClassmateContext getClassmateContext()
Access to the shared Classmate objects used throughout Hibernate's bootstrap process.- Returns:
- Access to the shared Classmate delegates.
-
getArchiveDescriptorFactory
ArchiveDescriptorFactory getArchiveDescriptorFactory()
Access to the ArchiveDescriptorFactory to be used for scanning- Returns:
- The ArchiveDescriptorFactory
-
getScanOptions
ScanOptions getScanOptions()
Access to the options to be used for scanning- Returns:
- The scan options
-
getScanEnvironment
ScanEnvironment getScanEnvironment()
Access to the environment for scanning. Consider this temporary; see discussion onScanEnvironment
- Returns:
- The scan environment
-
getScanner
Object getScanner()
Access 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
- Returns:
- The scanner
-
getReflectionManager
org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Retrieve the Hibernate Commons Annotations ReflectionManager to use.- Returns:
- The Hibernate Commons Annotations ReflectionManager to use.
-
getJandexView
org.jboss.jandex.IndexView getJandexView()
Access 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
- Returns:
- The Jandex index
-
getSqlFunctions
Map<String,SqmFunctionDescriptor> getSqlFunctions()
Access to any SQL functions explicitly registered with the MetadataBuilder. This does not include Dialect defined functions, etc.Should never return
null
- Returns:
- The SQLFunctions registered through MetadataBuilder
-
getAuxiliaryDatabaseObjectList
Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder. This does not include AuxiliaryDatabaseObject defined in mappings.Should never return
null
- Returns:
- The AuxiliaryDatabaseObject registered through MetadataBuilder
-
getAttributeConverters
Collection<ConverterDescriptor> getAttributeConverters()
Access to collected AttributeConverter definitions.Should never return
null
- Returns:
- The AttributeConverterInfo registered through MetadataBuilder
-
getCacheRegionDefinitions
Collection<CacheRegionDefinition> getCacheRegionDefinitions()
Access to all explicit cache region mappings.Should never return
null
- Returns:
- Explicit cache region mappings
-
getRepresentationStrategySelector
ManagedTypeRepresentationResolver getRepresentationStrategySelector()
-
release
void release()
Releases the "bootstrap only" resources held by this BootstrapContext.
-
registerAdHocBasicType
void registerAdHocBasicType(BasicTypeImpl<?> basicType)
To support envers
-
resolveAdHocBasicType
<T> BasicTypeImpl<T> resolveAdHocBasicType(String key)
To support envers
-
-