Package org.hibernate.boot.internal
Class BootstrapContextImpl
- java.lang.Object
- org.hibernate.boot.internal.BootstrapContextImpl
- All Implemented Interfaces:
BootstrapContext
public classBootstrapContextImplextendsObjectimplementsBootstrapContext
Constructor Summary
Constructors Constructor Description BootstrapContextImpl(StandardServiceRegistry serviceRegistry,MetadataBuildingOptions metadataBuildingOptions)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttributeConverterDescriptor(ConverterDescriptor descriptor)voidaddAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)voidaddCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)voidaddSqlFunction(String functionName,SqmFunctionDescriptor function)ArchiveDescriptorFactorygetArchiveDescriptorFactory()Access to theArchiveDescriptorFactoryused for scanning.Collection<ConverterDescriptor>getAttributeConverters()Access to collectedAttributeConverterdefinitions.Collection<AuxiliaryDatabaseObject>getAuxiliaryDatabaseObjectList()Access to anyAuxiliaryDatabaseObjects explicitly registered with theMetadataBuilder.Collection<CacheRegionDefinition>getCacheRegionDefinitions()Access to all explicit cache region mappings.ClassLoaderAccessgetClassLoaderAccess()Access to class loading capabilities.ClassmateContextgetClassmateContext()Access to the sharedClassmateContextobject used throughout the bootstrap process.BeanInstanceProducergetCustomTypeProducer()TheBeanInstanceProducerto use when creating custom type references.SqmFunctionRegistrygetFunctionRegistry()TheSqmFunctionRegistrybelonging to thisBootstrapContext.org.jboss.jandex.IndexViewgetJandexView()Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(IndexView), if any.MutableJpaCompliancegetJpaCompliance()In-flight form ofJpaComplianceClassLoadergetJpaTempClassLoader()Access the temporaryClassLoaderpassed to us, as defined byPersistenceUnitInfo.getNewTempClassLoader(), if any.MetadataBuildingOptionsgetMetadataBuildingOptions()Options specific to building theboot metamodelorg.hibernate.annotations.common.reflection.ReflectionManagergetReflectionManager()Retrieve the Hibernate Commons AnnotationsReflectionManager.ManagedTypeRepresentationResolvergetRepresentationStrategySelector()ScanEnvironmentgetScanEnvironment()Access to the environment for scanning.ObjectgetScanner()Access to theScannerto be used for scanning.ScanOptionsgetScanOptions()Access to the options to be used for scanning.StandardServiceRegistrygetServiceRegistry()The service registry available to bootstrappingMap<String,SqmFunctionDescriptor>getSqlFunctions()Access to any SQL functions explicitly registered with theMetadataBuilder.TypeConfigurationgetTypeConfiguration()TheTypeConfigurationbelonging to thisBootstrapContext.booleanisJpaBootstrap()Whether the bootstrap was initiated from JPA bootstrapping.voidmarkAsJpaBootstrap()Indicates that bootstrap was initiated from JPA bootstrapping.voidregisterAdHocBasicType(BasicType<?> basicType)To support Envers.voidrelease()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
Constructor Detail
BootstrapContextImpl
public BootstrapContextImpl(StandardServiceRegistry serviceRegistry,MetadataBuildingOptions metadataBuildingOptions)
Method Detail
getServiceRegistry
public StandardServiceRegistry getServiceRegistry()
Description copied from interface:BootstrapContextThe service registry available to bootstrapping- Specified by:
getServiceRegistryin interfaceBootstrapContext
getJpaCompliance
public MutableJpaCompliance getJpaCompliance()
Description copied from interface:BootstrapContextIn-flight form ofJpaCompliance- Specified by:
getJpaCompliancein interfaceBootstrapContext
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
Description copied from interface:BootstrapContextTheTypeConfigurationbelonging to thisBootstrapContext.- Specified by:
getTypeConfigurationin interfaceBootstrapContext- See Also:
TypeConfiguration
getFunctionRegistry
public SqmFunctionRegistry getFunctionRegistry()
Description copied from interface:BootstrapContextTheSqmFunctionRegistrybelonging to thisBootstrapContext.- Specified by:
getFunctionRegistryin interfaceBootstrapContext- See Also:
SqmFunctionRegistry
getCustomTypeProducer
public BeanInstanceProducer getCustomTypeProducer()
Description copied from interface:BootstrapContextTheBeanInstanceProducerto use when creating custom type references.- Specified by:
getCustomTypeProducerin interfaceBootstrapContext
getMetadataBuildingOptions
public MetadataBuildingOptions getMetadataBuildingOptions()
Description copied from interface:BootstrapContextOptions specific to building theboot metamodel- Specified by:
getMetadataBuildingOptionsin interfaceBootstrapContext
isJpaBootstrap
public boolean isJpaBootstrap()
Description copied from interface:BootstrapContextWhether the bootstrap was initiated from JPA bootstrapping.- Specified by:
isJpaBootstrapin interfaceBootstrapContext- See Also:
BootstrapContext.markAsJpaBootstrap()
markAsJpaBootstrap
public void markAsJpaBootstrap()
Description copied from interface:BootstrapContextIndicates that bootstrap was initiated from JPA bootstrapping.- Specified by:
markAsJpaBootstrapin interfaceBootstrapContext
getJpaTempClassLoader
public ClassLoader getJpaTempClassLoader()
Description copied from interface:BootstrapContextAccess the temporaryClassLoaderpassed to us, as defined byPersistenceUnitInfo.getNewTempClassLoader(), if any.- Specified by:
getJpaTempClassLoaderin interfaceBootstrapContext- Returns:
- The temporary
ClassLoader
getClassLoaderAccess
public ClassLoaderAccess getClassLoaderAccess()
Description copied from interface:BootstrapContextAccess to class loading capabilities.- Specified by:
getClassLoaderAccessin interfaceBootstrapContext
getClassmateContext
public ClassmateContext getClassmateContext()
Description copied from interface:BootstrapContextAccess to the sharedClassmateContextobject used throughout the bootstrap process.- Specified by:
getClassmateContextin interfaceBootstrapContext- Returns:
- Access to the shared
ClassmateContextdelegates.
getArchiveDescriptorFactory
public ArchiveDescriptorFactory getArchiveDescriptorFactory()
Description copied from interface:BootstrapContextAccess to theArchiveDescriptorFactoryused 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.- Specified by:
getScanEnvironmentin interfaceBootstrapContext- Returns:
- The scan environment
getScanner
public Object getScanner()
Description copied from interface:BootstrapContextAccess to theScannerto be used for scanning.Can be:
- An instance of
Scanner, - a
Classreference to theScannerimplementor, or - a string naming the
Scannerimplementor.
- Specified by:
getScannerin interfaceBootstrapContext- Returns:
- The scanner
- An instance of
getReflectionManager
public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Description copied from interface:BootstrapContextRetrieve the Hibernate Commons AnnotationsReflectionManager.- Specified by:
getReflectionManagerin interfaceBootstrapContext
getJandexView
public org.jboss.jandex.IndexView getJandexView()
Description copied from interface:BootstrapContextAccess to the Jandex index passed by call toMetadataBuilder.applyIndexView(IndexView), if any.- 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 theMetadataBuilder. This does not includeDialect-registered functions.Should never return
null.- Specified by:
getSqlFunctionsin interfaceBootstrapContext- Returns:
- The
SqmFunctionDescriptors registered viaMetadataBuilder
getAuxiliaryDatabaseObjectList
public Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Description copied from interface:BootstrapContextAccess to anyAuxiliaryDatabaseObjects explicitly registered with theMetadataBuilder. This does not includeAuxiliaryDatabaseObjects defined in mappings.Should never return
null.- Specified by:
getAuxiliaryDatabaseObjectListin interfaceBootstrapContext- Returns:
- The
AuxiliaryDatabaseObjects registered viaMetadataBuilder
getAttributeConverters
public Collection<ConverterDescriptor> getAttributeConverters()
Description copied from interface:BootstrapContextAccess to collectedAttributeConverterdefinitions.Should never return
null.- Specified by:
getAttributeConvertersin interfaceBootstrapContext- Returns:
- The
ConverterDescriptors registered viaMetadataBuilder
getCacheRegionDefinitions
public Collection<CacheRegionDefinition> getCacheRegionDefinitions()
Description copied from interface:BootstrapContextAccess to all explicit cache region mappings.Should never return
null.- Specified by:
getCacheRegionDefinitionsin interfaceBootstrapContext- Returns:
- Explicit cache region mappings
registerAdHocBasicType
public void registerAdHocBasicType(BasicType<?> basicType)
Description copied from interface:BootstrapContextTo support Envers.- Specified by:
registerAdHocBasicTypein interfaceBootstrapContext
resolveAdHocBasicType
public <T> BasicType<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 thisBootstrapContext.- Specified by:
releasein interfaceBootstrapContext
getRepresentationStrategySelector
public ManagedTypeRepresentationResolver getRepresentationStrategySelector()
- Specified by:
getRepresentationStrategySelectorin interfaceBootstrapContext- See Also:
ManagedTypeRepresentationResolver
addAttributeConverterDescriptor
public void addAttributeConverterDescriptor(ConverterDescriptor descriptor)
addSqlFunction
public void addSqlFunction(String functionName,SqmFunctionDescriptor function)
addAuxiliaryDatabaseObject
public void addAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)
addCacheRegionDefinition
public void addCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)