Package org.hibernate.testing.boot
Class BootstrapContextImpl
- java.lang.Object
-
- org.hibernate.testing.boot.BootstrapContextImpl
-
- All Implemented Interfaces:
BootstrapContext
public class BootstrapContextImpl extends java.lang.Object implements BootstrapContext
-
-
Field Summary
Fields Modifier and Type Field Description static BootstrapContextImpl
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete 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()
Retrieve the Hibernate Commons Annotations ReflectionManager to use.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.
-
-
-
Field Detail
-
INSTANCE
public static final BootstrapContextImpl INSTANCE
-
-
Method Detail
-
getServiceRegistry
public StandardServiceRegistry getServiceRegistry()
- Specified by:
getServiceRegistry
in interfaceBootstrapContext
-
getJpaCompliance
public MutableJpaCompliance getJpaCompliance()
- Specified by:
getJpaCompliance
in interfaceBootstrapContext
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
- Specified by:
getTypeConfiguration
in interfaceBootstrapContext
-
getMetadataBuildingOptions
public MetadataBuildingOptions getMetadataBuildingOptions()
- Specified by:
getMetadataBuildingOptions
in interfaceBootstrapContext
-
isJpaBootstrap
public boolean isJpaBootstrap()
- Specified by:
isJpaBootstrap
in interfaceBootstrapContext
-
markAsJpaBootstrap
public void markAsJpaBootstrap()
Description copied from interface:BootstrapContext
Indicates that bootstrap was initiated from JPA bootstrapping. Internallyfalse
is the assumed value. We only need to call this to mark that as true.- Specified by:
markAsJpaBootstrap
in interfaceBootstrapContext
-
getJpaTempClassLoader
public java.lang.ClassLoader getJpaTempClassLoader()
Description copied from interface:BootstrapContext
Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.- Specified by:
getJpaTempClassLoader
in interfaceBootstrapContext
- Returns:
- The tempo ClassLoader
-
getClassLoaderAccess
public ClassLoaderAccess getClassLoaderAccess()
- Specified by:
getClassLoaderAccess
in interfaceBootstrapContext
-
getClassmateContext
public org.hibernate.boot.internal.ClassmateContext getClassmateContext()
Description copied from interface:BootstrapContext
Access to the shared Classmate objects used throughout Hibernate's bootstrap process.- Specified by:
getClassmateContext
in interfaceBootstrapContext
- Returns:
- Access to the shared Classmate delegates.
-
getArchiveDescriptorFactory
public ArchiveDescriptorFactory getArchiveDescriptorFactory()
Description copied from interface:BootstrapContext
Access to the ArchiveDescriptorFactory to be 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. Consider this temporary; see discussion onScanEnvironment
- Specified by:
getScanEnvironment
in interfaceBootstrapContext
- Returns:
- The scan environment
-
getScanner
public java.lang.Object getScanner()
Description copied from interface:BootstrapContext
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
- Specified by:
getScanner
in interfaceBootstrapContext
- Returns:
- The scanner
-
getReflectionManager
public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Description copied from interface:BootstrapContext
Retrieve the Hibernate Commons Annotations ReflectionManager to use.- Specified by:
getReflectionManager
in interfaceBootstrapContext
- Returns:
- The Hibernate Commons Annotations ReflectionManager to use.
-
getJandexView
public org.jboss.jandex.IndexView getJandexView()
Description copied from interface:BootstrapContext
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- Specified by:
getJandexView
in interfaceBootstrapContext
- Returns:
- The Jandex index
-
getSqlFunctions
public java.util.Map<java.lang.String,SQLFunction> getSqlFunctions()
Description copied from interface:BootstrapContext
Access to any SQL functions explicitly registered with the MetadataBuilder. This does not include Dialect defined functions, etc. Should never returnnull
- Specified by:
getSqlFunctions
in interfaceBootstrapContext
- Returns:
- The SQLFunctions registered through MetadataBuilder
-
getAuxiliaryDatabaseObjectList
public java.util.Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Description copied from interface:BootstrapContext
Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder. This does not include AuxiliaryDatabaseObject defined in mappings. Should never returnnull
- Specified by:
getAuxiliaryDatabaseObjectList
in interfaceBootstrapContext
- Returns:
- The AuxiliaryDatabaseObject registered through MetadataBuilder
-
getAttributeConverters
public java.util.Collection<AttributeConverterInfo> getAttributeConverters()
Description copied from interface:BootstrapContext
Access to collected AttributeConverter definitions. Should never returnnull
- Specified by:
getAttributeConverters
in interfaceBootstrapContext
- Returns:
- The AttributeConverterInfo registered through MetadataBuilder
-
getCacheRegionDefinitions
public java.util.Collection<CacheRegionDefinition> getCacheRegionDefinitions()
Description copied from interface:BootstrapContext
Access to all explicit cache region mappings. Should never returnnull
- Specified by:
getCacheRegionDefinitions
in interfaceBootstrapContext
- Returns:
- Explicit cache region mappings
-
release
public void release()
Description copied from interface:BootstrapContext
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.- Specified by:
release
in interfaceBootstrapContext
-
-