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 Constructor Description MetadataBuildingOptionsImpl(StandardServiceRegistry serviceRegistry)
-
Method Summary
-
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 Detail
-
MetadataBuildingOptionsImpl
public MetadataBuildingOptionsImpl(StandardServiceRegistry serviceRegistry)
-
-
Method Detail
-
getServiceRegistry
public StandardServiceRegistry getServiceRegistry()
Description copied from interface:MetadataBuildingOptions
Access to theStandardServiceRegistry
.- Specified by:
getServiceRegistry
in interfaceMetadataBuildingOptions
-
getMappingDefaults
public MappingDefaults getMappingDefaults()
Description copied from interface:MetadataBuildingOptions
Access to theMappingDefaults
.- Specified by:
getMappingDefaults
in interfaceMetadataBuildingOptions
-
getIdentifierGeneratorFactory
public IdentifierGeneratorFactory getIdentifierGeneratorFactory()
Description copied from interface:MetadataBuildingOptions
The service implementingIdentifierGeneratorFactory
.- Specified by:
getIdentifierGeneratorFactory
in interfaceMetadataBuildingOptions
-
getDefaultTimeZoneStorage
public TimeZoneStorageStrategy 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:
MappingSettings.TIMEZONE_DEFAULT_STORAGE
,Dialect.getTimeZoneSupport()
-
getTimeZoneSupport
public TimeZoneSupport getTimeZoneSupport()
- Specified by:
getTimeZoneSupport
in interfaceMetadataBuildingOptions
- Returns:
- the
TimeZoneSupport
of the configuredDialect
- See Also:
Dialect.getTimeZoneSupport()
-
getWrapperArrayHandling
public WrapperArrayHandling getWrapperArrayHandling()
- Specified by:
getWrapperArrayHandling
in interfaceMetadataBuildingOptions
- Returns:
- the
WrapperArrayHandling
to use for wrapper arraysByte[]
andCharacter[]
. - See Also:
MappingSettings.WRAPPER_ARRAY_HANDLING
-
getBasicTypeRegistrations
public List<BasicTypeRegistration> 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
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
- Specified by:
getTypeConfiguration
in interfaceMetadataBuildingOptions
- Returns:
- the
TypeConfiguration
belonging to theBootstrapContext
-
getImplicitNamingStrategy
public ImplicitNamingStrategy getImplicitNamingStrategy()
- Specified by:
getImplicitNamingStrategy
in interfaceMetadataBuildingOptions
- See Also:
MappingSettings.IMPLICIT_NAMING_STRATEGY
-
getPhysicalNamingStrategy
public PhysicalNamingStrategy getPhysicalNamingStrategy()
- Specified by:
getPhysicalNamingStrategy
in interfaceMetadataBuildingOptions
- See Also:
MappingSettings.PHYSICAL_NAMING_STRATEGY
-
getColumnOrderingStrategy
public ColumnOrderingStrategy getColumnOrderingStrategy()
- Specified by:
getColumnOrderingStrategy
in interfaceMetadataBuildingOptions
- See Also:
MappingSettings.COLUMN_ORDERING_STRATEGY
-
getSharedCacheMode
public SharedCacheMode getSharedCacheMode()
Description copied from interface:MetadataBuildingOptions
Access to theSharedCacheMode
to determine if the second-level cache is enabled.- Specified by:
getSharedCacheMode
in interfaceMetadataBuildingOptions
- Returns:
- The
SharedCacheMode
- See Also:
CacheSettings.JAKARTA_SHARED_CACHE_MODE
-
getImplicitCacheAccessType
public AccessType getImplicitCacheAccessType()
Description copied from interface:MetadataBuildingOptions
Access to any implicit cacheAccessType
.- Specified by:
getImplicitCacheAccessType
in interfaceMetadataBuildingOptions
- Returns:
- The implicit cache
AccessType
- See Also:
CacheSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY
-
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:
MultiTenancySettings.MULTI_TENANT_CONNECTION_PROVIDER
-
getIdGenerationTypeInterpreter
public IdGeneratorStrategyInterpreter getIdGenerationTypeInterpreter()
- Specified by:
getIdGenerationTypeInterpreter
in interfaceMetadataBuildingOptions
-
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:
MetadataBuilder.enableExplicitDiscriminatorsForJoinedSubclassSupport(boolean)
,MappingSettings.IGNORE_EXPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
-
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:
MetadataBuilder.enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean)
,MappingSettings.IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
-
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:
MappingSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
-
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:
MetadataBuilder.enableGlobalNationalizedCharacterDataSupport(boolean)
,MappingSettings.USE_NATIONALIZED_CHARACTER_DATA
-
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:
ConstraintMode.PROVIDER_DEFAULT
,SchemaToolingSettings.HBM2DDL_DEFAULT_CONSTRAINT_MODE
-
getSourceProcessOrdering
public List<MetadataSourceType> getSourceProcessOrdering()
Description copied from interface:MetadataBuildingOptions
Retrieve the ordering in which sources should be processed.- Specified by:
getSourceProcessOrdering
in interfaceMetadataBuildingOptions
- Returns:
- The order in which sources should be processed.
- See Also:
MappingSettings.ARTIFACT_PROCESSING_ORDER
-
getSchemaCharset
public String getSchemaCharset()
- Specified by:
getSchemaCharset
in interfaceMetadataBuildingOptions
- See Also:
SchemaToolingSettings.HBM2DDL_CHARSET_NAME
-
isXmlMappingEnabled
public boolean isXmlMappingEnabled()
- Specified by:
isXmlMappingEnabled
in interfaceMetadataBuildingOptions
- See Also:
MappingSettings.XML_MAPPING_ENABLED
-
disallowExtensionsInCdi
public boolean disallowExtensionsInCdi()
Description copied from interface:MetadataBuildingOptions
Check to see if extensions can be hosted in CDI- Specified by:
disallowExtensionsInCdi
in interfaceMetadataBuildingOptions
-
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
-
setBootstrapContext
public void setBootstrapContext(BootstrapContext bootstrapContext)
-
-