Top Description Methods
org.hibernate.boot.spi

public Interface MetadataBuildingOptions

Known Direct Implementers
org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl, org.hibernate.boot.spi.AbstractDelegatingMetadataBuildingOptions
Imports
java.util.List, .Map, javax.persistence.SharedCacheMode, org.hibernate.MultiTenancyStrategy, 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.model.IdGeneratorStrategyInterpreter, org.hibernate.boot.model.naming.ImplicitNamingStrategy, .PhysicalNamingStrategy, org.hibernate.boot.model.relational.AuxiliaryDatabaseObject, org.hibernate.boot.registry.StandardServiceRegistry, org.hibernate.cache.spi.access.AccessType, org.hibernate.cfg.MetadataSourceType, org.hibernate.dialect.function.SQLFunction, org.jboss.jandex.IndexView

Describes the options used while building the Metadata object (during org.hibernate.boot.MetadataBuilder#build() processing).
Author
Steve Ebersole
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true indicates we should do discrimination; false we should not.
createImplicitDiscriminatorsForJoinedInheritance
()

Whether we should do discrimination implicitly joined subclass style inheritance when no discriminator info is provided.

public ArchiveDescriptorFactory

Returns:

The ArchiveDescriptorFactory
getArchiveDescriptorFactory
()

Access to the ArchiveDescriptorFactory to be used for scanning
public List<AttributeConverterInfo>

Returns:

The AttributeConverterInfo registered through MetadataBuilder
getAttributeConverters
()

Access to collected AttributeConverter definitions.
public List<AuxiliaryDatabaseObject>

Returns:

The AuxiliaryDatabaseObject registered through MetadataBuilder
getAuxiliaryDatabaseObjectList
()

Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder.
public List<BasicTypeRegistration>

Returns:

The BasicType registrations
getBasicTypeRegistrations
()

Access the list of BasicType registrations.

public List<CacheRegionDefinition>

Returns:

Explicit cache region mappings.
getCacheRegionDefinitions
()

Deprecated Use BootstrapContext#getClassmateContext() instead.
Access to all explicit cache region mappings.
public IdGeneratorStrategyInterpreter
public AccessType

Returns:

The implicit cache AccessType
getImplicitCacheAccessType
()

Access to any implicit cache AccessType.

public ImplicitNamingStrategy
public IndexView

Returns:

The Jandex index
getJandexView
()

Deprecated Use BootstrapContext#getJandexView() instead.
Access to the Jandex index passed by call to org.hibernate.boot.MetadataBuilder#applyIndexView(org.jboss.jandex.IndexView), if any.
public MappingDefaults

Returns:

The mapping defaults
getMappingDefaults
()

Access to the mapping defaults.

public MultiTenancyStrategy

Returns:

The MultiTenancyStrategy
getMultiTenancyStrategy
()

Access to the MultiTenancyStrategy for this environment.

public PhysicalNamingStrategy
public ReflectionManager

Returns:

The Hibernate Commons Annotations ReflectionManager to use.
getReflectionManager
()

Deprecated Use BootstrapContext#getReflectionManager() instead, The plan is to remove first MetadataBuildingOptions#getReflectionManager() keeping BootstrapContext#getReflectionManager() till the migration from Hibernate Commons Annotations to Jandex.
Retrieve the Hibernate Commons Annotations ReflectionManager to use.
public ScanEnvironment

Returns:

The scan environment
getScanEnvironment
()

Deprecated Use BootstrapContext#getScanEnvironment() instead.
Access to the environment for scanning.
public Object

Returns:

The scanner
getScanner
()

Deprecated Use BootstrapContext#getScanner() instead.
Access to the Scanner to be used for scanning.
public ScanOptions

Returns:

The scan options
getScanOptions
()

Deprecated Use BootstrapContext#getScanOptions() instead.
Access to the options to be used for scanning
public default String
public StandardServiceRegistry

Returns:

The service registry
getServiceRegistry
()

Access to the service registry.

public SharedCacheMode

Returns:

The SharedCacheMode
getSharedCacheMode
()

Access to the SharedCacheMode for determining whether we should perform second level caching or not.

public List<MetadataSourceType>

Returns:

The order in which sources should be processed.
getSourceProcessOrdering
()

Retrieve the ordering in which sources should be processed.

public Map<String, SQLFunction>

Returns:

The SQLFunctions registered through MetadataBuilder
getSqlFunctions
()

Deprecated Use BootstrapContext#getSqlFunctions() instead.
Access to any SQL functions explicitly registered with the MetadataBuilder.
public ClassLoader

Returns:

The tempo ClassLoader
getTempClassLoader
()

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

Returns:

true indicates they should be ignored; false indicates they should not be ignored.
ignoreExplicitDiscriminatorsForJoinedInheritance
()

Whether explicit discriminator declarations should be ignored for joined subclass style inheritance.

public boolean

Returns:

true if not create constraint by default; false otherwise.
isNoConstraintByDefault
()

Should we create constraint by default?

public boolean
public default boolean
public boolean

Returns:

true indicates we should force the discriminator in selects for any mappings which do not say explicitly.
shouldImplicitlyForceDiscriminatorInSelect
()

Whether we should implicitly force discriminators into SQL selects.

public boolean

Returns:

true if nationalized character data should be used by default; false otherwise.
useNationalizedCharacterData
()

Should we use nationalized variants of character data (e.g. NVARCHAR rather than VARCHAR) by default?

Method Detail

createImplicitDiscriminatorsForJoinedInheritanceback to summary
public boolean createImplicitDiscriminatorsForJoinedInheritance()

Whether we should do discrimination implicitly joined subclass style inheritance when no discriminator info is provided.

Returns:boolean

true indicates we should do discrimination; false we should not.

See Also
org.hibernate.boot.MetadataBuilder#enableImplicitDiscriminatorsForJoinedSubclassSupport, org.hibernate.cfg.AvailableSettings#IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
getArchiveDescriptorFactoryback to summary
public ArchiveDescriptorFactory getArchiveDescriptorFactory()

Access to the ArchiveDescriptorFactory to be used for scanning

Returns:ArchiveDescriptorFactory

The ArchiveDescriptorFactory

Annotations
@Deprecated
getAttributeConvertersback to summary
public List<AttributeConverterInfo> getAttributeConverters()

Access to collected AttributeConverter definitions.

Returns:List<AttributeConverterInfo>

The AttributeConverterInfo registered through MetadataBuilder

Annotations
@Deprecated
getAuxiliaryDatabaseObjectListback to summary
public List<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()

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

Returns:List<AuxiliaryDatabaseObject>

The AuxiliaryDatabaseObject registered through MetadataBuilder

Annotations
@Deprecated
getBasicTypeRegistrationsback to summary
public List<BasicTypeRegistration> getBasicTypeRegistrations()

Access the list of BasicType registrations. These are the BasicTypes explicitly registered via calls to:

Returns:List<BasicTypeRegistration>

The BasicType registrations

getCacheRegionDefinitionsback to summary
public List<CacheRegionDefinition> getCacheRegionDefinitions()

Access to all explicit cache region mappings.

Returns:List<CacheRegionDefinition>

Explicit cache region mappings.

Annotations
@Deprecated
getIdGenerationTypeInterpreterback to summary
public IdGeneratorStrategyInterpreter getIdGenerationTypeInterpreter()
getImplicitCacheAccessTypeback to summary
public AccessType getImplicitCacheAccessType()

Access to any implicit cache AccessType.

Returns:AccessType

The implicit cache AccessType

getImplicitNamingStrategyback to summary
public ImplicitNamingStrategy getImplicitNamingStrategy()
getJandexViewback to summary
public IndexView getJandexView()

Deprecated

Use BootstrapContext#getJandexView() instead.

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

Returns:IndexView

The Jandex index

Annotations
@Deprecated
getMappingDefaultsback to summary
public MappingDefaults getMappingDefaults()

Access to the mapping defaults.

Returns:MappingDefaults

The mapping defaults

getMultiTenancyStrategyback to summary
public MultiTenancyStrategy getMultiTenancyStrategy()

Access to the MultiTenancyStrategy for this environment.

Returns:MultiTenancyStrategy

The MultiTenancyStrategy

getPhysicalNamingStrategyback to summary
public PhysicalNamingStrategy getPhysicalNamingStrategy()
getReflectionManagerback to summary
public ReflectionManager getReflectionManager()

Deprecated

Use BootstrapContext#getReflectionManager() instead, The plan is to remove first MetadataBuildingOptions#getReflectionManager() keeping BootstrapContext#getReflectionManager() till the migration from Hibernate Commons Annotations to Jandex.

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()

Deprecated

Use BootstrapContext#getScanEnvironment() instead.

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

Returns:ScanEnvironment

The scan environment

Annotations
@Deprecated
getScannerback to summary
public Object getScanner()

Deprecated

Use BootstrapContext#getScanner() instead.

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
@Deprecated
getScanOptionsback to summary
public ScanOptions getScanOptions()

Deprecated

Use BootstrapContext#getScanOptions() instead.

Access to the options to be used for scanning

Returns:ScanOptions

The scan options

Annotations
@Deprecated
getSchemaCharsetback to summary
public default String getSchemaCharset()
getServiceRegistryback to summary
public StandardServiceRegistry getServiceRegistry()

Access to the service registry.

Returns:StandardServiceRegistry

The service registry

getSharedCacheModeback to summary
public SharedCacheMode getSharedCacheMode()

Access to the SharedCacheMode for determining whether we should perform second level caching or not.

Returns:SharedCacheMode

The SharedCacheMode

getSourceProcessOrderingback to summary
public List<MetadataSourceType> getSourceProcessOrdering()

Retrieve the ordering in which sources should be processed.

Returns:List<MetadataSourceType>

The order in which sources should be processed.

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

Deprecated

Use BootstrapContext#getSqlFunctions() instead.

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

Returns:Map<String, SQLFunction>

The SQLFunctions registered through MetadataBuilder

Annotations
@Deprecated
getTempClassLoaderback to summary
public ClassLoader getTempClassLoader()

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

Returns:ClassLoader

The tempo ClassLoader

Annotations
@Deprecated
ignoreExplicitDiscriminatorsForJoinedInheritanceback to summary
public boolean ignoreExplicitDiscriminatorsForJoinedInheritance()

Whether explicit discriminator declarations should be ignored for joined subclass style inheritance.

Returns:boolean

true indicates they should be ignored; false indicates they should not be ignored.

See Also
org.hibernate.boot.MetadataBuilder#enableExplicitDiscriminatorsForJoinedSubclassSupport, org.hibernate.cfg.AvailableSettings#IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
isNoConstraintByDefaultback to summary
public boolean isNoConstraintByDefault()

Should we create constraint by default?

Returns:boolean

true if not create constraint by default; false otherwise.

See Also
javax.persistence.ConstraintMode#PROVIDER_DEFAULT, org.hibernate.cfg.AvailableSettings#DEFAULT_CONSTRAINT_MODE
isSpecjProprietarySyntaxEnabledback to summary
public boolean isSpecjProprietarySyntaxEnabled()
isXmlMappingEnabledback to summary
public default boolean isXmlMappingEnabled()
shouldImplicitlyForceDiscriminatorInSelectback to summary
public boolean shouldImplicitlyForceDiscriminatorInSelect()

Whether we should implicitly force discriminators into SQL selects. By default, Hibernate will not. This can be specified per discriminator in the mapping as well.

Returns:boolean

true indicates we should force the discriminator in selects for any mappings which do not say explicitly.

See Also
org.hibernate.cfg.AvailableSettings#FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
useNationalizedCharacterDataback to summary
public boolean useNationalizedCharacterData()

Should we use nationalized variants of character data (e.g. NVARCHAR rather than VARCHAR) by default?

Returns:boolean

true if nationalized character data should be used by default; false otherwise.

See Also
org.hibernate.boot.MetadataBuilder#enableGlobalNationalizedCharacterDataSupport, org.hibernate.cfg.AvailableSettings#USE_NATIONALIZED_CHARACTER_DATA