Package org.hibernate.boot.internal
Class MetadataBuilderImpl.MetadataBuildingOptionsImpl
java.lang.Object
org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl
- All Implemented Interfaces:
JpaOrmXmlPersistenceUnitDefaultAware
,MetadataBuildingOptions
- Enclosing class:
- MetadataBuilderImpl
public static class MetadataBuilderImpl.MetadataBuildingOptionsImpl
extends Object
implements MetadataBuildingOptions, JpaOrmXmlPersistenceUnitDefaultAware
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.boot.spi.JpaOrmXmlPersistenceUnitDefaultAware
JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(PersistenceUnitMetadata persistenceUnitMetadata) void
apply
(JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults) Yuck.boolean
Whether we should do discrimination implicitly joined subclass style inheritance when no discriminator info is provided.Access the list ofBasicType
registrations.Access the list ofCompositeUserType
registrations.Access to any implicit cacheAccessType
.Access to theMappingDefaults
.Access to theStandardServiceRegistry
.Access to theSharedCacheMode
to determine if the second-level cache is enabled.boolean
Whether explicit discriminator declarations should be ignored for joined subclass style inheritance.boolean
Check to see if extensions can be hosted in CDIboolean
Is multi-tenancy enabled?boolean
Should we disable constraint creation whenConstraintMode.PROVIDER_DEFAULT
?boolean
boolean
Whether to use the legacy format for serializing/deserializing XML data.boolean
void
setBootstrapContext
(BootstrapContext bootstrapContext) boolean
Whether we should implicitly force discriminators into SQL selects.boolean
Should we use nationalized variants of character data by default?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.MetadataBuildingOptions
getManagedTypeRepresentationResolver, getPersistentCollectionRepresentationResolver
-
Constructor Details
-
MetadataBuildingOptionsImpl
-
-
Method Details
-
getServiceRegistry
Description copied from interface:MetadataBuildingOptions
Access to theStandardServiceRegistry
.- Specified by:
getServiceRegistry
in interfaceMetadataBuildingOptions
-
getMappingDefaults
Description copied from interface:MetadataBuildingOptions
Access to theMappingDefaults
.- Specified by:
getMappingDefaults
in interfaceMetadataBuildingOptions
-
getDefaultTimeZoneStorage
- Specified by:
getDefaultTimeZoneStorage
in interfaceMetadataBuildingOptions
- Returns:
- the
TimeZoneStorageStrategy
determined by the global configuration property and the time zone support of the configuredDialect
- See Also:
-
getTimeZoneSupport
- Specified by:
getTimeZoneSupport
in interfaceMetadataBuildingOptions
- Returns:
- the
TimeZoneSupport
of the configuredDialect
- See Also:
-
getWrapperArrayHandling
- Specified by:
getWrapperArrayHandling
in interfaceMetadataBuildingOptions
- Returns:
- the
WrapperArrayHandling
to use for wrapper arraysByte[]
andCharacter[]
. - See Also:
-
getBasicTypeRegistrations
Description copied from interface:MetadataBuildingOptions
Access the list ofBasicType
registrations.These are the
BasicTypes
explicitly registered via calls to:- Specified by:
getBasicTypeRegistrations
in interfaceMetadataBuildingOptions
- Returns:
- The
BasicTypes
registrations
-
getCompositeUserTypes
Description copied from interface:MetadataBuildingOptions
Access the list ofCompositeUserType
registrations.- Specified by:
getCompositeUserTypes
in interfaceMetadataBuildingOptions
-
getTypeConfiguration
- Specified by:
getTypeConfiguration
in interfaceMetadataBuildingOptions
- Returns:
- the
TypeConfiguration
belonging to theBootstrapContext
-
getImplicitNamingStrategy
- Specified by:
getImplicitNamingStrategy
in interfaceMetadataBuildingOptions
- See Also:
-
getPhysicalNamingStrategy
- Specified by:
getPhysicalNamingStrategy
in interfaceMetadataBuildingOptions
- See Also:
-
getColumnOrderingStrategy
- Specified by:
getColumnOrderingStrategy
in interfaceMetadataBuildingOptions
- See Also:
-
getImplicitCacheAccessType
Description copied from interface:MetadataBuildingOptions
Access to any implicit cacheAccessType
.- Specified by:
getImplicitCacheAccessType
in interfaceMetadataBuildingOptions
- Returns:
- The implicit cache
AccessType
- See Also:
-
isMultiTenancyEnabled
public boolean isMultiTenancyEnabled()Description copied from interface:MetadataBuildingOptions
Is multi-tenancy enabled?Multi-tenancy is enabled implicitly if a
MultiTenantConnectionProvider
is available.- Specified by:
isMultiTenancyEnabled
in interfaceMetadataBuildingOptions
- Returns:
true
is multi-tenancy is enabled- See Also:
-
ignoreExplicitDiscriminatorsForJoinedInheritance
public boolean ignoreExplicitDiscriminatorsForJoinedInheritance()Description copied from interface:MetadataBuildingOptions
Whether explicit discriminator declarations should be ignored for joined subclass style inheritance.- Specified by:
ignoreExplicitDiscriminatorsForJoinedInheritance
in interfaceMetadataBuildingOptions
- Returns:
true
indicates they should be ignored;false
indicates they should not be ignored.- See Also:
-
createImplicitDiscriminatorsForJoinedInheritance
public boolean createImplicitDiscriminatorsForJoinedInheritance()Description copied from interface:MetadataBuildingOptions
Whether we should do discrimination implicitly joined subclass style inheritance when no discriminator info is provided.- Specified by:
createImplicitDiscriminatorsForJoinedInheritance
in interfaceMetadataBuildingOptions
- Returns:
true
indicates we should do discrimination;false
we should not.- See Also:
-
shouldImplicitlyForceDiscriminatorInSelect
public boolean shouldImplicitlyForceDiscriminatorInSelect()Description copied from interface:MetadataBuildingOptions
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.- Specified by:
shouldImplicitlyForceDiscriminatorInSelect
in interfaceMetadataBuildingOptions
- Returns:
true
indicates we should force the discriminator in selects for any mappings which do not say explicitly.- See Also:
-
useNationalizedCharacterData
public boolean useNationalizedCharacterData()Description copied from interface:MetadataBuildingOptions
Should we use nationalized variants of character data by default?For example, should
NVARCHAR
be used in preference toVARCHAR
?- Specified by:
useNationalizedCharacterData
in interfaceMetadataBuildingOptions
- Returns:
true
if nationalized character data should be used by default;false
otherwise.- See Also:
-
isSpecjProprietarySyntaxEnabled
public boolean isSpecjProprietarySyntaxEnabled()- Specified by:
isSpecjProprietarySyntaxEnabled
in interfaceMetadataBuildingOptions
-
isNoConstraintByDefault
public boolean isNoConstraintByDefault()Description copied from interface:MetadataBuildingOptions
Should we disable constraint creation whenConstraintMode.PROVIDER_DEFAULT
?- Specified by:
isNoConstraintByDefault
in interfaceMetadataBuildingOptions
- Returns:
true
if we should not create constraints by default;false
if we should.- See Also:
-
getSchemaCharset
- Specified by:
getSchemaCharset
in interfaceMetadataBuildingOptions
- See Also:
-
isXmlMappingEnabled
public boolean isXmlMappingEnabled()- Specified by:
isXmlMappingEnabled
in interfaceMetadataBuildingOptions
- See Also:
-
isAllowExtensionsInCdi
public boolean isAllowExtensionsInCdi()Description copied from interface:MetadataBuildingOptions
Check to see if extensions can be hosted in CDI- Specified by:
isAllowExtensionsInCdi
in interfaceMetadataBuildingOptions
-
isXmlFormatMapperLegacyFormatEnabled
public boolean isXmlFormatMapperLegacyFormatEnabled()Description copied from interface:MetadataBuildingOptions
Whether to use the legacy format for serializing/deserializing XML data.- Specified by:
isXmlFormatMapperLegacyFormatEnabled
in interfaceMetadataBuildingOptions
- See Also:
-
apply
public void apply(JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults) Yuck. This is needed because JPA lets users define "global building options" inorm.xml
mappings. Forget that there are generally multipleorm.xml
mappings if using XML approach... Ugh- Specified by:
apply
in interfaceJpaOrmXmlPersistenceUnitDefaultAware
- Parameters:
jpaOrmXmlPersistenceUnitDefaults
- Thepersistence-unit-defaults
values
-
apply
- Specified by:
apply
in interfaceJpaOrmXmlPersistenceUnitDefaultAware
-
setBootstrapContext
-