Top Description Methods
org.hibernate.boot.spi

public Interface BootstrapContext

Known Direct Implementers
org.hibernate.boot.internal.BootstrapContextImpl
Imports
java.util.Collection, .Map, org.hibernate.annotations.common.reflection.ReflectionManager, org.hibernate.boot.AttributeConverterInfo, .CacheRegionDefinition, org.hibernate.boot.archive.scan.spi.ScanEnvironment, .ScanOptions, org.hibernate.boot.archive.spi.ArchiveDescriptorFactory, org.hibernate.boot.internal.ClassmateContext, org.hibernate.boot.model.relational.AuxiliaryDatabaseObject, org.hibernate.boot.registry.StandardServiceRegistry, org.hibernate.dialect.function.SQLFunction, org.hibernate.jpa.spi.MutableJpaCompliance, org.hibernate.type.spi.TypeConfiguration, org.jboss.jandex.IndexView

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.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public ArchiveDescriptorFactory

Returns:

The ArchiveDescriptorFactory
getArchiveDescriptorFactory
()

Access to the ArchiveDescriptorFactory to be used for scanning

public Collection<AttributeConverterInfo>

Returns:

The AttributeConverterInfo registered through MetadataBuilder
getAttributeConverters
()

Access to collected AttributeConverter definitions.

public Collection<AuxiliaryDatabaseObject>

Returns:

The AuxiliaryDatabaseObject registered through MetadataBuilder
getAuxiliaryDatabaseObjectList
()

Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder.

public Collection<CacheRegionDefinition>

Returns:

Explicit cache region mappings
getCacheRegionDefinitions
()

Access to all explicit cache region mappings.

public ClassLoaderAccess
public ClassmateContext

Returns:

Access to the shared Classmate delegates.
getClassmateContext
()

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

public IndexView

Returns:

The Jandex index
getJandexView
()

Access to the Jandex index passed by call to org.hibernate.boot.MetadataBuilder#applyIndexView(org.jboss.jandex.IndexView), if any.

public MutableJpaCompliance
public ClassLoader

Returns:

The tempo ClassLoader
getJpaTempClassLoader
()

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

public MetadataBuildingOptions
public ReflectionManager

Returns:

The Hibernate Commons Annotations ReflectionManager to use.
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.
public ScanEnvironment

Returns:

The scan environment
getScanEnvironment
()

Access to the environment for scanning.

public Object

Returns:

The scanner
getScanner
()

Access to the Scanner to be used for scanning.

public ScanOptions

Returns:

The scan options
getScanOptions
()

Access to the options to be used for scanning

public StandardServiceRegistry
public Map<String, SQLFunction>

Returns:

The SQLFunctions registered through MetadataBuilder
getSqlFunctions
()

Access to any SQL functions explicitly registered with the MetadataBuilder.

public TypeConfiguration
public boolean
public void
markAsJpaBootstrap()

Indicates that bootstrap was initiated from JPA bootstrapping.

public void
release()

Releases the "bootstrap only" resources held by this BootstrapContext.

Method Detail

getArchiveDescriptorFactoryback to summary
public ArchiveDescriptorFactory getArchiveDescriptorFactory()

Access to the ArchiveDescriptorFactory to be used for scanning

Returns:ArchiveDescriptorFactory

The ArchiveDescriptorFactory

getAttributeConvertersback to summary
public Collection<AttributeConverterInfo> getAttributeConverters()

Access to collected AttributeConverter definitions.

Should never return null

Returns:Collection<AttributeConverterInfo>

The AttributeConverterInfo registered through MetadataBuilder

getAuxiliaryDatabaseObjectListback to summary
public 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:Collection<AuxiliaryDatabaseObject>

The AuxiliaryDatabaseObject registered through MetadataBuilder

getCacheRegionDefinitionsback to summary
public Collection<CacheRegionDefinition> getCacheRegionDefinitions()

Access to all explicit cache region mappings.

Should never return null

Returns:Collection<CacheRegionDefinition>

Explicit cache region mappings

getClassLoaderAccessback to summary
public ClassLoaderAccess getClassLoaderAccess()
getClassmateContextback to summary
public ClassmateContext getClassmateContext()

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

Returns:ClassmateContext

Access to the shared Classmate delegates.

getJandexViewback to summary
public IndexView 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

getJpaComplianceback to summary
public MutableJpaCompliance getJpaCompliance()
getJpaTempClassLoaderback to summary
public ClassLoader getJpaTempClassLoader()

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

Returns:ClassLoader

The tempo ClassLoader

getMetadataBuildingOptionsback to summary
public MetadataBuildingOptions getMetadataBuildingOptions()
getReflectionManagerback to summary
public 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:ReflectionManager

The Hibernate Commons Annotations ReflectionManager to use.

Annotations
@Deprecated
getScanEnvironmentback to summary
public ScanEnvironment getScanEnvironment()

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

Returns:ScanEnvironment

The scan environment

getScannerback to summary
public 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:Object

The scanner

getScanOptionsback to summary
public ScanOptions getScanOptions()

Access to the options to be used for scanning

Returns:ScanOptions

The scan options

getServiceRegistryback to summary
public StandardServiceRegistry getServiceRegistry()
getSqlFunctionsback to summary
public Map<String, SQLFunction> 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

getTypeConfigurationback to summary
public TypeConfiguration getTypeConfiguration()
isJpaBootstrapback to summary
public boolean isJpaBootstrap()
markAsJpaBootstrapback to summary
public void 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.

releaseback to summary
public 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.