Package org.hibernate.boot.spi
Interface BootstrapContext
-
- All Known Implementing Classes:
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 Deprecated Methods Modifier and Type Method Description ArchiveDescriptorFactory
getArchiveDescriptorFactory()
Access to the ArchiveDescriptorFactory to be used for scanningjava.util.Collection<AttributeConverterInfo>
getAttributeConverters()
Access to collected AttributeConverter definitions.java.util.Collection<AuxiliaryDatabaseObject>
getAuxiliaryDatabaseObjectList()
Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder.java.util.Collection<CacheRegionDefinition>
getCacheRegionDefinitions()
Access to all explicit cache region mappings.ClassLoaderAccess
getClassLoaderAccess()
org.hibernate.boot.internal.ClassmateContext
getClassmateContext()
Access to the shared Classmate objects used throughout Hibernate's bootstrap process.org.jboss.jandex.IndexView
getJandexView()
Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(org.jboss.jandex.IndexView)
, if any.MutableJpaCompliance
getJpaCompliance()
java.lang.ClassLoader
getJpaTempClassLoader()
Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.MetadataBuildingOptions
getMetadataBuildingOptions()
org.hibernate.annotations.common.reflection.ReflectionManager
getReflectionManager()
Deprecated.Deprecated (with no replacement) to indicate that this will go away as we migrate away from Hibernate Commons Annotations to Jandex for annotation handling and XMl->annotation merging.ScanEnvironment
getScanEnvironment()
Access to the environment for scanning.java.lang.Object
getScanner()
Access to the Scanner to be used for scanning.ScanOptions
getScanOptions()
Access to the options to be used for scanningStandardServiceRegistry
getServiceRegistry()
java.util.Map<java.lang.String,SQLFunction>
getSqlFunctions()
Access to any SQL functions explicitly registered with the MetadataBuilder.TypeConfiguration
getTypeConfiguration()
boolean
isJpaBootstrap()
void
markAsJpaBootstrap()
Indicates that bootstrap was initiated from JPA bootstrapping.void
release()
Releases the "bootstrap only" resources held by this BootstrapContext.
-
-
-
Method Detail
-
getServiceRegistry
StandardServiceRegistry getServiceRegistry()
-
getJpaCompliance
MutableJpaCompliance getJpaCompliance()
-
getTypeConfiguration
TypeConfiguration getTypeConfiguration()
-
getMetadataBuildingOptions
MetadataBuildingOptions getMetadataBuildingOptions()
-
isJpaBootstrap
boolean isJpaBootstrap()
-
markAsJpaBootstrap
void markAsJpaBootstrap()
Indicates that bootstrap was initiated from JPA bootstrapping. Internallyfalse
is the assumed value. We only need to call this to mark that as true.
-
getJpaTempClassLoader
java.lang.ClassLoader getJpaTempClassLoader()
Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.- Returns:
- The tempo ClassLoader
-
getClassLoaderAccess
ClassLoaderAccess getClassLoaderAccess()
-
getClassmateContext
org.hibernate.boot.internal.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
java.lang.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
@Deprecated org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Deprecated.Deprecated (with no replacement) to indicate that this will go away as we migrate away from Hibernate Commons Annotations to Jandex for annotation handling and XMl->annotation merging.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(org.jboss.jandex.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
java.util.Map<java.lang.String,SQLFunction> getSqlFunctions()
Access to any SQL functions explicitly registered with the MetadataBuilder. This does not include Dialect defined functions, etc. Should never returnnull
- Returns:
- The SQLFunctions registered through MetadataBuilder
-
getAuxiliaryDatabaseObjectList
java.util.Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder. This does not include AuxiliaryDatabaseObject defined in mappings. Should never returnnull
- Returns:
- The AuxiliaryDatabaseObject registered through MetadataBuilder
-
getAttributeConverters
java.util.Collection<AttributeConverterInfo> getAttributeConverters()
Access to collected AttributeConverter definitions. Should never returnnull
- Returns:
- The AttributeConverterInfo registered through MetadataBuilder
-
getCacheRegionDefinitions
java.util.Collection<CacheRegionDefinition> getCacheRegionDefinitions()
Access to all explicit cache region mappings. Should never returnnull
- Returns:
- Explicit cache region mappings
-
release
void release()
Releases 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.
-
-