Top Description Fields Constructors Methods
org.hibernate.boot.spi

public abstract Class AbstractDelegatingMetadataBuilderImplementor<T extends org.hibernate.boot.spi.MetadataBuilderImplementor>

extends Object
implements MetadataBuilderImplementor
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.spi.MetadataBuilderImplementor, org.hibernate.boot.MetadataBuilder
Type Parameters
<T>
The specific subclass; Allows subclasses to narrow the return type of the contract methods to a specialization of MetadataBuilderImplementor.
Imports
org.hibernate.boot.CacheRegionDefinition, .Metadata, .MetadataBuilder, org.hibernate.boot.archive.scan.spi.ScanEnvironment, .ScanOptions, .Scanner, org.hibernate.boot.archive.spi.ArchiveDescriptorFactory, org.hibernate.boot.model.FunctionContributor, .TypeContributor, org.hibernate.boot.model.convert.spi.ConverterDescriptor, org.hibernate.boot.model.naming.ImplicitNamingStrategy, .PhysicalNamingStrategy, org.hibernate.boot.model.relational.AuxiliaryDatabaseObject, .ColumnOrderingStrategy, org.hibernate.cache.spi.access.AccessType, org.hibernate.cfg.MetadataSourceType, org.hibernate.query.sqm.function.SqmFunctionDescriptor, org.hibernate.type.BasicType, org.hibernate.usertype.UserType, org.jboss.jandex.IndexView, jakarta.persistence.AttributeConverter, .SharedCacheMode

Convenience base class for custom implementors of MetadataBuilderImplementor using delegation.
Author
Gunnar Morling

Field Summary

Modifier and TypeField and Description
private final MetadataBuilderImplementor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public MetadataBuilder
applyAccessType(AccessType
The access-type to use as default.
accessType
)

Implements org.hibernate.boot.MetadataBuilder.applyAccessType.

Specify the second-level access-type to be used by default for entities and collections that define second-level caching, but do not specify a granular access-type.
public MetadataBuilder
applyArchiveDescriptorFactory(ArchiveDescriptorFactory
The ArchiveDescriptorFactory to use.
factory
)

Implements org.hibernate.boot.MetadataBuilder.applyArchiveDescriptorFactory.

Specify a particular ArchiveDescriptorFactory instance to use in scanning.
public MetadataBuilder
public <O, R> MetadataBuilder
applyAttributeConverter(Class<? extends AttributeConverter<O, R>>
The AttributeConverter class.
attributeConverterClass
)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter by its Class.
public <O, R> MetadataBuilder
applyAttributeConverter(Class<? extends AttributeConverter<O, R>>
The AttributeConverter class.
attributeConverterClass
,
boolean
Should the AttributeConverter be auto applied to property types as specified by its "entity attribute" parameterized type?
autoApply
)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter by Class, explicitly indicating whether to auto-apply it.
public MetadataBuilder
applyAttributeConverter(AttributeConverter<X, Y>
The AttributeConverter instance.
attributeConverter
)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter instance.
public MetadataBuilder
applyAttributeConverter(AttributeConverter<X, Y>
The AttributeConverter instance.
attributeConverter
,
boolean
Should the AttributeConverter be auto applied to property types as specified by its "entity attribute" parameterized type?
autoApply
)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter instance, explicitly indicating whether to auto-apply it.
public MetadataBuilder
public MetadataBuilder
applyBasicType(BasicType<?>
The type addition or override.
type
)

Implements org.hibernate.boot.MetadataBuilder.applyBasicType.

Specify an additional or overridden basic type mapping.
public MetadataBuilder
applyBasicType(BasicType<?>
The type addition or override.
type
,
String...
The keys under which to register the basic type.
keys
)

Implements org.hibernate.boot.MetadataBuilder.applyBasicType.

Specify an additional or overridden basic type mapping supplying specific registration keys.
public MetadataBuilder
applyBasicType(UserType<?>
The custom type
type
,
String...
The keys under which to register the custom type.
keys
)

Implements org.hibernate.boot.MetadataBuilder.applyBasicType.

Register an additional or overridden custom type mapping.
public MetadataBuilder
applyCacheRegionDefinition(CacheRegionDefinition
The cache region definition to apply
cacheRegionDefinition
)

Implements org.hibernate.boot.MetadataBuilder.applyCacheRegionDefinition.

Apply a CacheRegionDefinition to be applied to an entity, collection, or query while building the Metadata object.
public MetadataBuilder
public MetadataBuilder
applyFunctions(FunctionContributor
The contributor to apply
functionContributor
)

Implements org.hibernate.boot.MetadataBuilder.applyFunctions.

Apply an explicit FunctionContributor (implicit application via java.util.ServiceLoader will still happen too)
public MetadataBuilder
applyImplicitCatalogName(String
The implicit catalog name
implicitCatalogName
)

Implements org.hibernate.boot.MetadataBuilder.applyImplicitCatalogName.

Specify the implicit catalog name to apply to any unqualified database names.
public MetadataBuilder
public MetadataBuilder
applyImplicitSchemaName(String
The implicit schema name
implicitSchemaName
)

Implements org.hibernate.boot.MetadataBuilder.applyImplicitSchemaName.

Specify the implicit schema name to apply to any unqualified database names.
public MetadataBuilder
applyIndexView(IndexView
The Jandex index to use.
jandexView
)

Implements org.hibernate.boot.MetadataBuilder.applyIndexView.

Allows specifying a specific Jandex index to use for reading annotation information.
public MetadataBuilder
public MetadataBuilder
applyScanEnvironment(ScanEnvironment
The environment for scanning
scanEnvironment
)

Implements org.hibernate.boot.MetadataBuilder.applyScanEnvironment.

Consider this temporary as discussed on ScanEnvironment
public MetadataBuilder
applyScanner(Scanner
The scanner to use.
scanner
)

Implements org.hibernate.boot.MetadataBuilder.applyScanner.

Specify a particular Scanner instance to use.
public MetadataBuilder
applyScanOptions(ScanOptions
The scan options.
scanOptions
)

Implements org.hibernate.boot.MetadataBuilder.applyScanOptions.

Specify the options to be used in performing scanning.
public MetadataBuilder
applySharedCacheMode(SharedCacheMode
The cache mode.
cacheMode
)

Implements org.hibernate.boot.MetadataBuilder.applySharedCacheMode.

Specify the second-level cache mode.
public MetadataBuilder
applySourceProcessOrdering(MetadataSourceType...
The types, in the order they should be processed
sourceTypes
)

Implements org.hibernate.boot.MetadataBuilder.applySourceProcessOrdering.

Deprecated as a consequence of MetadataSourceType being deprecated.
Apply a specific ordering to the processing of sources.
public MetadataBuilder
public MetadataBuilder
applyTempClassLoader(ClassLoader
ClassLoader for use while building the Metadata
tempClassLoader
)

Implements org.hibernate.boot.MetadataBuilder.applyTempClassLoader.

Apply a ClassLoader for use while building the Metadata.
public MetadataBuilder
applyTypes(TypeContributor
The contributor to apply
typeContributor
)

Implements org.hibernate.boot.MetadataBuilder.applyTypes.

Apply an explicit TypeContributor (implicit application via java.util.ServiceLoader will still happen too)
public Metadata
build()

Implements org.hibernate.boot.MetadataBuilder.build.

Deprecated as a consequence of Metadata being deprecated.
Actually build the metamodel
protected MetadataBuilderImplementor
public MetadataBuilder
enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean
Should processing (not ignoring) explicit discriminators be enabled?
enabled
)

Implements org.hibernate.boot.MetadataBuilder.enableExplicitDiscriminatorsForJoinedSubclassSupport.

Should we process or ignore explicitly defined discriminators in the case of joined subclasses?
public MetadataBuilder
enableGlobalNationalizedCharacterDataSupport(boolean
true says to use nationalized variants; false says to use the non-nationalized variants.
enabled
)

Implements org.hibernate.boot.MetadataBuilder.enableGlobalNationalizedCharacterDataSupport.

Should nationalized variants of character data be used in the database types?
public MetadataBuilder
enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean
Should we implicitly create discriminator for joined inheritance if one is not explicitly mentioned?
enabled
)

Implements org.hibernate.boot.MetadataBuilder.enableImplicitDiscriminatorsForJoinedSubclassSupport.

Similarly to enableExplicitDiscriminatorsForJoinedSubclassSupport, but here how should we treat joined inheritance when there is no explicitly defined discriminator annotations?
public MetadataBuilder
enableImplicitForcingOfDiscriminatorsInSelect(boolean
true indicates we will force the discriminator into the select; false indicates we will not.
supported
)

Implements org.hibernate.boot.MetadataBuilder.enableImplicitForcingOfDiscriminatorsInSelect.

For entities which do not explicitly say, should we force discriminators into SQL selects?
public MetadataBuildingOptions
getMetadataBuildingOptions()

Implements org.hibernate.boot.spi.MetadataBuilderImplementor.getMetadataBuildingOptions.

Get the options being collected on this MetadataBuilder that will ultimately be used in building the Metadata.
protected abstract T
getThis()

Returns a specific implementation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final MetadataBuilderImplementor delegate

Constructor Detail

AbstractDelegatingMetadataBuilderImplementorback to summary
public AbstractDelegatingMetadataBuilderImplementor(MetadataBuilderImplementor delegate)

Method Detail

applyAccessTypeback to summary
public MetadataBuilder applyAccessType(AccessType accessType)

Implements org.hibernate.boot.MetadataBuilder.applyAccessType.

Doc from org.hibernate.boot.MetadataBuilder.applyAccessType.

Specify the second-level access-type to be used by default for entities and collections that define second-level caching, but do not specify a granular access-type.

Its default is defined by the hibernate.cache.default_cache_concurrency_strategy setting if using property-based configuration.

Parameters
accessType:AccessType

The access-type to use as default.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyArchiveDescriptorFactoryback to summary
public MetadataBuilder applyArchiveDescriptorFactory(ArchiveDescriptorFactory factory)

Implements org.hibernate.boot.MetadataBuilder.applyArchiveDescriptorFactory.

Doc from org.hibernate.boot.MetadataBuilder.applyArchiveDescriptorFactory.

Specify a particular ArchiveDescriptorFactory instance to use in scanning.

Its default is defined by the hibernate.archive.interpreter setting if using property-based configuration.

Parameters
factory:ArchiveDescriptorFactory

The ArchiveDescriptorFactory to use.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyAttributeConverterback to summary
public MetadataBuilder applyAttributeConverter(ConverterDescriptor descriptor)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Doc from org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter by a ConverterDescriptor

Parameters
descriptor:ConverterDescriptor

The descriptor

Returns:MetadataBuilder

this for method chaining

Annotations
@Override
applyAttributeConverterback to summary
public <O, R> MetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter<O, R>> attributeConverterClass)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Doc from org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter by its Class.

Parameters
attributeConverterClass:Class<? extends AttributeConverter<O, R>>

The AttributeConverter class.

Returns:MetadataBuilder

this for method chaining

Annotations
@Override
applyAttributeConverterback to summary
public <O, R> MetadataBuilder applyAttributeConverter(Class<? extends AttributeConverter<O, R>> attributeConverterClass, boolean autoApply)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Doc from org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter by Class, explicitly indicating whether to auto-apply it.

Parameters
attributeConverterClass:Class<? extends AttributeConverter<O, R>>

The AttributeConverter class.

autoApply:boolean

Should the AttributeConverter be auto applied to property types as specified by its "entity attribute" parameterized type?

Returns:MetadataBuilder

this for method chaining

Annotations
@Override
applyAttributeConverterback to summary
public MetadataBuilder applyAttributeConverter(AttributeConverter<X, Y> attributeConverter)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Doc from org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter instance.

Parameters
attributeConverter:AttributeConverter<X, Y>

The AttributeConverter instance.

Returns:MetadataBuilder

this for method chaining

Annotations
@Override
applyAttributeConverterback to summary
public MetadataBuilder applyAttributeConverter(AttributeConverter<X, Y> attributeConverter, boolean autoApply)

Implements org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Doc from org.hibernate.boot.MetadataBuilder.applyAttributeConverter.

Adds an AttributeConverter instance, explicitly indicating whether to auto-apply it.

Parameters
attributeConverter:AttributeConverter<X, Y>

The AttributeConverter instance.

autoApply:boolean

Should the AttributeConverter be auto applied to property types as specified by its "entity attribute" parameterized type?

Returns:MetadataBuilder

this for method chaining

Annotations
@Override
applyAuxiliaryDatabaseObjectback to summary
public MetadataBuilder applyAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)

Implements org.hibernate.boot.MetadataBuilder.applyAuxiliaryDatabaseObject.

Doc from org.hibernate.boot.MetadataBuilder.applyAuxiliaryDatabaseObject.

Contribute an AuxiliaryDatabaseObject.

Annotations
@Override
applyBasicTypeback to summary
public MetadataBuilder applyBasicType(BasicType<?> type)

Implements org.hibernate.boot.MetadataBuilder.applyBasicType.

Doc from org.hibernate.boot.MetadataBuilder.applyBasicType.

Specify an additional or overridden basic type mapping.

Parameters
type:BasicType<?>

The type addition or override.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyBasicTypeback to summary
public MetadataBuilder applyBasicType(BasicType<?> type, String... keys)

Implements org.hibernate.boot.MetadataBuilder.applyBasicType.

Doc from org.hibernate.boot.MetadataBuilder.applyBasicType.

Specify an additional or overridden basic type mapping supplying specific registration keys.

Parameters
type:BasicType<?>

The type addition or override.

keys:String[]

The keys under which to register the basic type.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyBasicTypeback to summary
public MetadataBuilder applyBasicType(UserType<?> type, String... keys)

Implements org.hibernate.boot.MetadataBuilder.applyBasicType.

Doc from org.hibernate.boot.MetadataBuilder.applyBasicType.

Register an additional or overridden custom type mapping.

Parameters
type:UserType<?>

The custom type

keys:String[]

The keys under which to register the custom type.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyCacheRegionDefinitionback to summary
public MetadataBuilder applyCacheRegionDefinition(CacheRegionDefinition cacheRegionDefinition)

Implements org.hibernate.boot.MetadataBuilder.applyCacheRegionDefinition.

Doc from org.hibernate.boot.MetadataBuilder.applyCacheRegionDefinition.

Apply a CacheRegionDefinition to be applied to an entity, collection, or query while building the Metadata object.

Parameters
cacheRegionDefinition:CacheRegionDefinition

The cache region definition to apply

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyColumnOrderingStrategyback to summary
public MetadataBuilder applyColumnOrderingStrategy(ColumnOrderingStrategy columnOrderingStrategy)

Implements org.hibernate.boot.MetadataBuilder.applyColumnOrderingStrategy.

Doc from org.hibernate.boot.MetadataBuilder.applyColumnOrderingStrategy.

Specify the ColumnOrderingStrategy.

Its default is defined by the hibernate.column_ordering_strategy setting if using property-based configuration.

Parameters
columnOrderingStrategy:ColumnOrderingStrategy

The ColumnOrderingStrategy

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyFunctionsback to summary
public MetadataBuilder applyFunctions(FunctionContributor functionContributor)

Implements org.hibernate.boot.MetadataBuilder.applyFunctions.

Doc from org.hibernate.boot.MetadataBuilder.applyFunctions.

Apply an explicit FunctionContributor (implicit application via java.util.ServiceLoader will still happen too)

Parameters
functionContributor:FunctionContributor

The contributor to apply

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyImplicitCatalogNameback to summary
public MetadataBuilder applyImplicitCatalogName(String implicitCatalogName)

Implements org.hibernate.boot.MetadataBuilder.applyImplicitCatalogName.

Doc from org.hibernate.boot.MetadataBuilder.applyImplicitCatalogName.

Specify the implicit catalog name to apply to any unqualified database names.

Its default is defined by the hibernate.default_catalog setting if using property-based configuration.

Parameters
implicitCatalogName:String

The implicit catalog name

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyImplicitNamingStrategyback to summary
public MetadataBuilder applyImplicitNamingStrategy(ImplicitNamingStrategy namingStrategy)

Implements org.hibernate.boot.MetadataBuilder.applyImplicitNamingStrategy.

Doc from org.hibernate.boot.MetadataBuilder.applyImplicitNamingStrategy.

Specify the ImplicitNamingStrategy.

Its default is defined by the hibernate.implicit_naming_strategy setting if using property-based configuration.

Parameters
namingStrategy:ImplicitNamingStrategy

The ImplicitNamingStrategy

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyImplicitSchemaNameback to summary
public MetadataBuilder applyImplicitSchemaName(String implicitSchemaName)

Implements org.hibernate.boot.MetadataBuilder.applyImplicitSchemaName.

Doc from org.hibernate.boot.MetadataBuilder.applyImplicitSchemaName.

Specify the implicit schema name to apply to any unqualified database names.

Its default is defined by the hibernate.default_schema setting if using property-based configuration.

Parameters
implicitSchemaName:String

The implicit schema name

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyIndexViewback to summary
public MetadataBuilder applyIndexView(IndexView jandexView)

Implements org.hibernate.boot.MetadataBuilder.applyIndexView.

Doc from org.hibernate.boot.MetadataBuilder.applyIndexView.

Allows specifying a specific Jandex index to use for reading annotation information.

It's important to understand that if a Jandex index is passed in, it is expected that this Jandex index already contains all entries for all classes. No additional indexing will be done in this case.

Parameters
jandexView:IndexView

The Jandex index to use.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyPhysicalNamingStrategyback to summary
public MetadataBuilder applyPhysicalNamingStrategy(PhysicalNamingStrategy namingStrategy)

Implements org.hibernate.boot.MetadataBuilder.applyPhysicalNamingStrategy.

Doc from org.hibernate.boot.MetadataBuilder.applyPhysicalNamingStrategy.

Specify the PhysicalNamingStrategy.

Its default is defined by the hibernate.physical_naming_strategy setting if using property-based configuration.

Parameters
namingStrategy:PhysicalNamingStrategy

The PhysicalNamingStrategy

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyScanEnvironmentback to summary
public MetadataBuilder applyScanEnvironment(ScanEnvironment scanEnvironment)

Implements org.hibernate.boot.MetadataBuilder.applyScanEnvironment.

Doc from org.hibernate.boot.MetadataBuilder.applyScanEnvironment.

Consider this temporary as discussed on ScanEnvironment

Parameters
scanEnvironment:ScanEnvironment

The environment for scanning

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyScannerback to summary
public MetadataBuilder applyScanner(Scanner scanner)

Implements org.hibernate.boot.MetadataBuilder.applyScanner.

Doc from org.hibernate.boot.MetadataBuilder.applyScanner.

Specify a particular Scanner instance to use.

Its default is defined by the hibernate.archive.scanner setting if using property-based configuration.

Parameters
scanner:Scanner

The scanner to use.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyScanOptionsback to summary
public MetadataBuilder applyScanOptions(ScanOptions scanOptions)

Implements org.hibernate.boot.MetadataBuilder.applyScanOptions.

Doc from org.hibernate.boot.MetadataBuilder.applyScanOptions.

Specify the options to be used in performing scanning.

Parameters
scanOptions:ScanOptions

The scan options.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applySharedCacheModeback to summary
public MetadataBuilder applySharedCacheMode(SharedCacheMode cacheMode)

Implements org.hibernate.boot.MetadataBuilder.applySharedCacheMode.

Doc from org.hibernate.boot.MetadataBuilder.applySharedCacheMode.

Specify the second-level cache mode.

Its default is defined by the javax.persistence.sharedCache.mode setting if using property-based configuration.

Parameters
cacheMode:SharedCacheMode

The cache mode.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applySourceProcessOrderingback to summary
public MetadataBuilder applySourceProcessOrdering(MetadataSourceType... sourceTypes)

Implements org.hibernate.boot.MetadataBuilder.applySourceProcessOrdering.

Doc from org.hibernate.boot.MetadataBuilder.applySourceProcessOrdering.

Deprecated

as a consequence of MetadataSourceType being deprecated. See corresponding docs for further information.

Apply a specific ordering to the processing of sources.

Unlike most of the methods of this interface (which deal with multiple values internally), this one replaces any source processing order that was already set.

Its default is defined by the hibernate.mapping.precedence setting if using property-based configuration.

Parameters
sourceTypes:MetadataSourceType[]

The types, in the order they should be processed

Returns:MetadataBuilder

this for method chaining

Annotations
@Override
applySqlFunctionback to summary
public MetadataBuilder applySqlFunction(String functionName, SqmFunctionDescriptor function)

Implements org.hibernate.boot.MetadataBuilder.applySqlFunction.

Doc from org.hibernate.boot.MetadataBuilder.applySqlFunction.

Contribute a SqmFunctionDescriptor to HQL.

Annotations
@Override
applyTempClassLoaderback to summary
public MetadataBuilder applyTempClassLoader(ClassLoader tempClassLoader)

Implements org.hibernate.boot.MetadataBuilder.applyTempClassLoader.

Doc from org.hibernate.boot.MetadataBuilder.applyTempClassLoader.

Apply a ClassLoader for use while building the Metadata.

Ideally we should avoid accessing ClassLoaders when perform 1st phase of bootstrap. This is a ClassLoader that can be used in cases where we absolutely must.

In EE managed environments, this is the ClassLoader mandated by jakarta.persistence.spi.PersistenceUnitInfo#getNewTempClassLoader(). This ClassLoader is discarded by the container afterward, the idea being that the Class can still be enhanced in the application ClassLoader.

In other environments, pass a ClassLoader that performs the same function, if desired.

Parameters
tempClassLoader:ClassLoader

ClassLoader for use while building the Metadata

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
applyTypesback to summary
public MetadataBuilder applyTypes(TypeContributor typeContributor)

Implements org.hibernate.boot.MetadataBuilder.applyTypes.

Doc from org.hibernate.boot.MetadataBuilder.applyTypes.

Apply an explicit TypeContributor (implicit application via java.util.ServiceLoader will still happen too)

Parameters
typeContributor:TypeContributor

The contributor to apply

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
buildback to summary
public Metadata build()

Implements org.hibernate.boot.MetadataBuilder.build.

Doc from org.hibernate.boot.MetadataBuilder.build.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Actually build the metamodel

Returns:Metadata

The built metadata.

Annotations
@Override
delegateback to summary
protected MetadataBuilderImplementor delegate()
enableExplicitDiscriminatorsForJoinedSubclassSupportback to summary
public MetadataBuilder enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)

Implements org.hibernate.boot.MetadataBuilder.enableExplicitDiscriminatorsForJoinedSubclassSupport.

Doc from org.hibernate.boot.MetadataBuilder.enableExplicitDiscriminatorsForJoinedSubclassSupport.

Should we process or ignore explicitly defined discriminators in the case of joined subclasses? The legacy behavior of Hibernate was to ignore the discriminator annotations because Hibernate (unlike some providers) does not need discriminators to determine the concrete type when it comes to joined inheritance. However, for portability reasons we do now allow using explicit discriminators along with joined inheritance. It is configurable though to support legacy apps.

Its default is defined by the hibernate.discriminator.ignore_explicit_for_joined setting if using property-based configuration.

Parameters
enabled:boolean

Should processing (not ignoring) explicit discriminators be enabled?

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
enableGlobalNationalizedCharacterDataSupportback to summary
public MetadataBuilder enableGlobalNationalizedCharacterDataSupport(boolean enabled)

Implements org.hibernate.boot.MetadataBuilder.enableGlobalNationalizedCharacterDataSupport.

Doc from org.hibernate.boot.MetadataBuilder.enableGlobalNationalizedCharacterDataSupport.

Should nationalized variants of character data be used in the database types? For example, should NVARCHAR be used instead of VARCHAR? NCLOB instead of CLOB?

Its default is defined by the hibernate.use_nationalized_character_data setting if using property-based configuration.

Parameters
enabled:boolean

true says to use nationalized variants; false says to use the non-nationalized variants.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
enableImplicitDiscriminatorsForJoinedSubclassSupportback to summary
public MetadataBuilder enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean enabled)

Implements org.hibernate.boot.MetadataBuilder.enableImplicitDiscriminatorsForJoinedSubclassSupport.

Doc from org.hibernate.boot.MetadataBuilder.enableImplicitDiscriminatorsForJoinedSubclassSupport.

Similarly to enableExplicitDiscriminatorsForJoinedSubclassSupport, but here how should we treat joined inheritance when there is no explicitly defined discriminator annotations? If enabled, we will handle joined inheritance with no explicit discriminator annotations by implicitly creating one (following the JPA implicit naming rules).

Again the premise here is JPA portability, bearing in mind that some JPA provider need these discriminators.

Its default is defined by the hibernate.discriminator.implicit_for_joined setting if using property-based configuration.

Parameters
enabled:boolean

Should we implicitly create discriminator for joined inheritance if one is not explicitly mentioned?

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
enableImplicitForcingOfDiscriminatorsInSelectback to summary
public MetadataBuilder enableImplicitForcingOfDiscriminatorsInSelect(boolean supported)

Implements org.hibernate.boot.MetadataBuilder.enableImplicitForcingOfDiscriminatorsInSelect.

Doc from org.hibernate.boot.MetadataBuilder.enableImplicitForcingOfDiscriminatorsInSelect.

For entities which do not explicitly say, should we force discriminators into SQL selects? The (historical) default is false

Its default is defined by the hibernate.discriminator.force_in_select setting if using property-based configuration.

Parameters
supported:boolean

true indicates we will force the discriminator into the select; false indicates we will not.

Returns:MetadataBuilder

this, for method chaining

Annotations
@Override
getMetadataBuildingOptionsback to summary
public MetadataBuildingOptions getMetadataBuildingOptions()

Implements org.hibernate.boot.spi.MetadataBuilderImplementor.getMetadataBuildingOptions.

Doc from org.hibernate.boot.spi.MetadataBuilderImplementor.getMetadataBuildingOptions.

Get the options being collected on this MetadataBuilder that will ultimately be used in building the Metadata.

Returns:MetadataBuildingOptions

The current building options

Annotations
@Override
getThisback to summary
protected abstract T getThis()

Returns a specific implementation. See the What is the "getThis trick?".