Top Fields Constructors Methods
org.hibernate.boot.internal

public Class BootstrapContextImpl

extends Object
implements BootstrapContext
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.spi.BootstrapContext
Imports
java.util.ArrayList, .Collection, .Collections, .HashMap, .Map, org.hibernate.AssertionFailure, org.hibernate.annotations.common.reflection.ReflectionManager, org.hibernate.annotations.common.reflection.java.JavaReflectionManager, org.hibernate.boot.AttributeConverterInfo, .CacheRegionDefinition, org.hibernate.boot.archive.scan.internal.StandardScanOptions, org.hibernate.boot.archive.scan.spi.ScanEnvironment, .ScanOptions, .Scanner, org.hibernate.boot.archive.spi.ArchiveDescriptorFactory, org.hibernate.boot.model.relational.AuxiliaryDatabaseObject, org.hibernate.boot.registry.StandardServiceRegistry, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.boot.registry.selector.spi.StrategySelector, org.hibernate.boot.spi.BootstrapContext, .ClassLoaderAccess, .MetadataBuildingOptions, org.hibernate.cfg.AvailableSettings, org.hibernate.cfg.annotations.reflection.internal.JPAXMLOverriddenMetadataProvider, org.hibernate.dialect.function.SQLFunction, org.hibernate.engine.config.spi.ConfigurationService, org.hibernate.jpa.internal.MutableJpaComplianceImpl, org.hibernate.jpa.spi.MutableJpaCompliance, org.hibernate.type.spi.TypeConfiguration, org.jboss.jandex.IndexView, org.jboss.logging.Logger

Author
Andrea Boriero

Field Summary

Modifier and TypeField and Description
private ArchiveDescriptorFactory
private HashMap<Class<T>, AttributeConverterInfo>
private ArrayList<AuxiliaryDatabaseObject>
private ArrayList<CacheRegionDefinition>
private final ClassLoaderAccessImpl
private final ClassmateContext
private final JavaReflectionManager
private boolean
private IndexView
private final MutableJpaCompliance
private static final Logger
private final MetadataBuildingOptions
private ScanEnvironment
private Object
private ScanOptions
private final StandardServiceRegistry
private HashMap<String, SQLFunction>
private final TypeConfiguration

Constructor Summary

AccessConstructor and Description
public
BootstrapContextImpl(StandardServiceRegistry serviceRegistry, MetadataBuildingOptions metadataBuildingOptions)

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
addSqlFunction(String functionName, SQLFunction function)

private JavaReflectionManager
public ArchiveDescriptorFactory
getArchiveDescriptorFactory()

Implements org.hibernate.boot.spi.BootstrapContext.getArchiveDescriptorFactory.

Access to the ArchiveDescriptorFactory to be used for scanning
public Collection<AttributeConverterInfo>
getAttributeConverters()

Implements org.hibernate.boot.spi.BootstrapContext.getAttributeConverters.

Access to collected AttributeConverter definitions.
public Collection<AuxiliaryDatabaseObject>
getAuxiliaryDatabaseObjectList()

Implements org.hibernate.boot.spi.BootstrapContext.getAuxiliaryDatabaseObjectList.

Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder.
public Collection<CacheRegionDefinition>
getCacheRegionDefinitions()

Implements org.hibernate.boot.spi.BootstrapContext.getCacheRegionDefinitions.

Access to all explicit cache region mappings.
public ClassLoaderAccess
public ClassmateContext
getClassmateContext()

Implements org.hibernate.boot.spi.BootstrapContext.getClassmateContext.

Access to the shared Classmate objects used throughout Hibernate's bootstrap process.
public IndexView
public MutableJpaCompliance
public ClassLoader
public MetadataBuildingOptions
public ReflectionManager
getReflectionManager()

Implements org.hibernate.boot.spi.BootstrapContext.getReflectionManager.

Retrieve the Hibernate Commons Annotations ReflectionManager to use.
public ScanEnvironment
getScanEnvironment()

Implements org.hibernate.boot.spi.BootstrapContext.getScanEnvironment.

Access to the environment for scanning.
public Object
getScanner()

Implements org.hibernate.boot.spi.BootstrapContext.getScanner.

Access to the Scanner to be used for scanning.
public ScanOptions
getScanOptions()

Implements org.hibernate.boot.spi.BootstrapContext.getScanOptions.

Access to the options to be used for scanning
public StandardServiceRegistry
public Map<String, SQLFunction>
getSqlFunctions()

Implements org.hibernate.boot.spi.BootstrapContext.getSqlFunctions.

Access to any SQL functions explicitly registered with the MetadataBuilder.
public TypeConfiguration
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
public boolean
public void
markAsJpaBootstrap()

Implements org.hibernate.boot.spi.BootstrapContext.markAsJpaBootstrap.

Indicates that bootstrap was initiated from JPA bootstrapping.
public void
release()

Implements org.hibernate.boot.spi.BootstrapContext.release.

Releases the "bootstrap only" resources held by this BootstrapContext.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

archiveDescriptorFactoryback to summary
private ArchiveDescriptorFactory archiveDescriptorFactory
attributeConverterInfoMapback to summary
private HashMap<Class<T>, AttributeConverterInfo> attributeConverterInfoMap
auxiliaryDatabaseObjectListback to summary
private ArrayList<AuxiliaryDatabaseObject> auxiliaryDatabaseObjectList
cacheRegionDefinitionsback to summary
private ArrayList<CacheRegionDefinition> cacheRegionDefinitions
classLoaderAccessback to summary
private final ClassLoaderAccessImpl classLoaderAccess
classmateContextback to summary
private final ClassmateContext classmateContext
hcannReflectionManagerback to summary
private final JavaReflectionManager hcannReflectionManager
isJpaBootstrapback to summary
private boolean isJpaBootstrap
jandexViewback to summary
private IndexView jandexView
jpaComplianceback to summary
private final MutableJpaCompliance jpaCompliance
logback to summary
private static final Logger log
metadataBuildingOptionsback to summary
private final MetadataBuildingOptions metadataBuildingOptions
scanEnvironmentback to summary
private ScanEnvironment scanEnvironment
scannerSettingback to summary
private Object scannerSetting
scanOptionsback to summary
private ScanOptions scanOptions
serviceRegistryback to summary
private final StandardServiceRegistry serviceRegistry
sqlFunctionMapback to summary
private HashMap<String, SQLFunction> sqlFunctionMap
typeConfigurationback to summary
private final TypeConfiguration typeConfiguration

Constructor Detail

BootstrapContextImplback to summary
public BootstrapContextImpl(StandardServiceRegistry serviceRegistry, MetadataBuildingOptions metadataBuildingOptions)

Method Detail

addAttributeConverterInfoback to summary
public void addAttributeConverterInfo(AttributeConverterInfo info)
addAuxiliaryDatabaseObjectback to summary
public void addAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)
addCacheRegionDefinitionback to summary
public void addCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)
addSqlFunctionback to summary
public void addSqlFunction(String functionName, SQLFunction function)
generateHcannReflectionManagerback to summary
private JavaReflectionManager generateHcannReflectionManager()
getArchiveDescriptorFactoryback to summary
public ArchiveDescriptorFactory getArchiveDescriptorFactory()

Implements org.hibernate.boot.spi.BootstrapContext.getArchiveDescriptorFactory.

Doc from org.hibernate.boot.spi.BootstrapContext.getArchiveDescriptorFactory.

Access to the ArchiveDescriptorFactory to be used for scanning

Returns:ArchiveDescriptorFactory

The ArchiveDescriptorFactory

Annotations
@Override
getAttributeConvertersback to summary
public Collection<AttributeConverterInfo> getAttributeConverters()

Implements org.hibernate.boot.spi.BootstrapContext.getAttributeConverters.

Doc from org.hibernate.boot.spi.BootstrapContext.getAttributeConverters.

Access to collected AttributeConverter definitions.

Should never return null

Returns:Collection<AttributeConverterInfo>

The AttributeConverterInfo registered through MetadataBuilder

Annotations
@Override
getAuxiliaryDatabaseObjectListback to summary
public Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()

Implements org.hibernate.boot.spi.BootstrapContext.getAuxiliaryDatabaseObjectList.

Doc from org.hibernate.boot.spi.BootstrapContext.getAuxiliaryDatabaseObjectList.

Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder. This does not include AuxiliaryDatabaseObject defined in mappings.

Should never return null

Returns:Collection<AuxiliaryDatabaseObject>

The AuxiliaryDatabaseObject registered through MetadataBuilder

Annotations
@Override
getCacheRegionDefinitionsback to summary
public Collection<CacheRegionDefinition> getCacheRegionDefinitions()

Implements org.hibernate.boot.spi.BootstrapContext.getCacheRegionDefinitions.

Doc from org.hibernate.boot.spi.BootstrapContext.getCacheRegionDefinitions.

Access to all explicit cache region mappings.

Should never return null

Returns:Collection<CacheRegionDefinition>

Explicit cache region mappings

Annotations
@Override
getClassLoaderAccessback to summary
public ClassLoaderAccess getClassLoaderAccess()

Implements org.hibernate.boot.spi.BootstrapContext.getClassLoaderAccess.

Annotations
@Override
getClassmateContextback to summary
public ClassmateContext getClassmateContext()

Implements org.hibernate.boot.spi.BootstrapContext.getClassmateContext.

Doc from org.hibernate.boot.spi.BootstrapContext.getClassmateContext.

Access to the shared Classmate objects used throughout Hibernate's bootstrap process.

Returns:ClassmateContext

Access to the shared Classmate delegates.

Annotations
@Override
getJandexViewback to summary
public IndexView getJandexView()

Implements org.hibernate.boot.spi.BootstrapContext.getJandexView.

Doc from org.hibernate.boot.spi.BootstrapContext.getJandexView.

Access to the Jandex index passed by call to org.hibernate.boot.MetadataBuilder#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:IndexView

The Jandex index

Annotations
@Override
getJpaComplianceback to summary
public MutableJpaCompliance getJpaCompliance()

Implements org.hibernate.boot.spi.BootstrapContext.getJpaCompliance.

Annotations
@Override
getJpaTempClassLoaderback to summary
public ClassLoader getJpaTempClassLoader()

Implements org.hibernate.boot.spi.BootstrapContext.getJpaTempClassLoader.

Doc from org.hibernate.boot.spi.BootstrapContext.getJpaTempClassLoader.

Access the temporary ClassLoader passed to us as defined by javax.persistence.spi.PersistenceUnitInfo#getNewTempClassLoader(), if any.

Returns:ClassLoader

The tempo ClassLoader

Annotations
@Override
getMetadataBuildingOptionsback to summary
public MetadataBuildingOptions getMetadataBuildingOptions()

Implements org.hibernate.boot.spi.BootstrapContext.getMetadataBuildingOptions.

Annotations
@Override
getReflectionManagerback to summary
public ReflectionManager getReflectionManager()

Implements org.hibernate.boot.spi.BootstrapContext.getReflectionManager.

Doc from org.hibernate.boot.spi.BootstrapContext.getReflectionManager.

Retrieve the Hibernate Commons Annotations ReflectionManager to use.

Returns:ReflectionManager

The Hibernate Commons Annotations ReflectionManager to use.

Annotations
@Override
getScanEnvironmentback to summary
public ScanEnvironment getScanEnvironment()

Implements org.hibernate.boot.spi.BootstrapContext.getScanEnvironment.

Doc from org.hibernate.boot.spi.BootstrapContext.getScanEnvironment.

Access to the environment for scanning. Consider this temporary; see discussion on ScanEnvironment

Returns:ScanEnvironment

The scan environment

Annotations
@Override
getScannerback to summary
public Object getScanner()

Implements org.hibernate.boot.spi.BootstrapContext.getScanner.

Doc from org.hibernate.boot.spi.BootstrapContext.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:Object

The scanner

Annotations
@Override
getScanOptionsback to summary
public ScanOptions getScanOptions()

Implements org.hibernate.boot.spi.BootstrapContext.getScanOptions.

Doc from org.hibernate.boot.spi.BootstrapContext.getScanOptions.

Access to the options to be used for scanning

Returns:ScanOptions

The scan options

Annotations
@Override
getServiceRegistryback to summary
public StandardServiceRegistry getServiceRegistry()

Implements org.hibernate.boot.spi.BootstrapContext.getServiceRegistry.

Annotations
@Override
getSqlFunctionsback to summary
public Map<String, SQLFunction> getSqlFunctions()

Implements org.hibernate.boot.spi.BootstrapContext.getSqlFunctions.

Doc from org.hibernate.boot.spi.BootstrapContext.getSqlFunctions.

Access to any SQL functions explicitly registered with the MetadataBuilder. This does not include Dialect defined functions, etc.

Should never return null

Returns:Map<String, SQLFunction>

The SQLFunctions registered through MetadataBuilder

Annotations
@Override
getTypeConfigurationback to summary
public TypeConfiguration getTypeConfiguration()

Implements org.hibernate.boot.spi.BootstrapContext.getTypeConfiguration.

Annotations
@Override
injectArchiveDescriptorFactoryback to summary
pack-priv void injectArchiveDescriptorFactory(ArchiveDescriptorFactory factory)
injectJandexViewback to summary
pack-priv void injectJandexView(IndexView jandexView)
injectJpaTempClassLoaderback to summary
pack-priv void injectJpaTempClassLoader(ClassLoader jpaTempClassLoader)
injectScanEnvironmentback to summary
pack-priv void injectScanEnvironment(ScanEnvironment scanEnvironment)
injectScannerback to summary
pack-priv void injectScanner(Scanner scanner)
injectScanOptionsback to summary
pack-priv void injectScanOptions(ScanOptions scanOptions)
isJpaBootstrapback to summary
public boolean isJpaBootstrap()

Implements org.hibernate.boot.spi.BootstrapContext.isJpaBootstrap.

Annotations
@Override
markAsJpaBootstrapback to summary
public void markAsJpaBootstrap()

Implements org.hibernate.boot.spi.BootstrapContext.markAsJpaBootstrap.

Doc from org.hibernate.boot.spi.BootstrapContext.markAsJpaBootstrap.

Indicates that bootstrap was initiated from JPA bootstrapping. Internally false is the assumed value. We only need to call this to mark that as true.

Annotations
@Override
releaseback to summary
public void release()

Implements org.hibernate.boot.spi.BootstrapContext.release.

Doc from org.hibernate.boot.spi.BootstrapContext.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.

Annotations
@Override