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
disallowExtensionsInCdi, getManagedTypeRepresentationResolver, getPersistentCollectionRepresentationResolver
-
-
-
-
Constructor Detail
-
MetadataBuildingOptionsImpl
public MetadataBuildingOptionsImpl(StandardServiceRegistry serviceRegistry)
-
-
Method Detail
-
getServiceRegistry
public StandardServiceRegistry getServiceRegistry()
Description copied from interface:MetadataBuildingOptionsAccess to theStandardServiceRegistry.- Specified by:
getServiceRegistryin interfaceMetadataBuildingOptions
-
getMappingDefaults
public MappingDefaults getMappingDefaults()
Description copied from interface:MetadataBuildingOptionsAccess to theMappingDefaults.- Specified by:
getMappingDefaultsin interfaceMetadataBuildingOptions
-
getIdentifierGeneratorFactory
public IdentifierGeneratorFactory getIdentifierGeneratorFactory()
Description copied from interface:MetadataBuildingOptionsThe service implementingIdentifierGeneratorFactory.- Specified by:
getIdentifierGeneratorFactoryin interfaceMetadataBuildingOptions
-
getDefaultTimeZoneStorage
public TimeZoneStorageStrategy getDefaultTimeZoneStorage()
- Specified by:
getDefaultTimeZoneStoragein interfaceMetadataBuildingOptions- Returns:
- the
TimeZoneStorageStrategydetermined 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:
getTimeZoneSupportin interfaceMetadataBuildingOptions- Returns:
- the
TimeZoneSupportof the configuredDialect - See Also:
Dialect.getTimeZoneSupport()
-
getWrapperArrayHandling
public WrapperArrayHandling getWrapperArrayHandling()
- Specified by:
getWrapperArrayHandlingin interfaceMetadataBuildingOptions- Returns:
- the
WrapperArrayHandlingto use for wrapper arraysByte[]andCharacter[]. - See Also:
MappingSettings.WRAPPER_ARRAY_HANDLING
-
getBasicTypeRegistrations
public List<BasicTypeRegistration> getBasicTypeRegistrations()
Description copied from interface:MetadataBuildingOptionsAccess the list ofBasicTyperegistrations.These are the
BasicTypesexplicitly registered via calls to:- Specified by:
getBasicTypeRegistrationsin interfaceMetadataBuildingOptions- Returns:
- The
BasicTypesregistrations
-
getCompositeUserTypes
public List<CompositeUserType<?>> getCompositeUserTypes()
Description copied from interface:MetadataBuildingOptionsAccess the list ofCompositeUserTyperegistrations.- Specified by:
getCompositeUserTypesin interfaceMetadataBuildingOptions
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
- Specified by:
getTypeConfigurationin interfaceMetadataBuildingOptions- Returns:
- the
TypeConfigurationbelonging to theBootstrapContext
-
getImplicitNamingStrategy
public ImplicitNamingStrategy getImplicitNamingStrategy()
- Specified by:
getImplicitNamingStrategyin interfaceMetadataBuildingOptions- See Also:
MappingSettings.IMPLICIT_NAMING_STRATEGY
-
getPhysicalNamingStrategy
public PhysicalNamingStrategy getPhysicalNamingStrategy()
- Specified by:
getPhysicalNamingStrategyin interfaceMetadataBuildingOptions- See Also:
MappingSettings.PHYSICAL_NAMING_STRATEGY
-
getColumnOrderingStrategy
public ColumnOrderingStrategy getColumnOrderingStrategy()
- Specified by:
getColumnOrderingStrategyin interfaceMetadataBuildingOptions- See Also:
MappingSettings.COLUMN_ORDERING_STRATEGY
-
getSharedCacheMode
public SharedCacheMode getSharedCacheMode()
Description copied from interface:MetadataBuildingOptionsAccess to theSharedCacheModeto determine if the second-level cache is enabled.- Specified by:
getSharedCacheModein interfaceMetadataBuildingOptions- Returns:
- The
SharedCacheMode - See Also:
CacheSettings.JAKARTA_SHARED_CACHE_MODE
-
getImplicitCacheAccessType
public AccessType getImplicitCacheAccessType()
Description copied from interface:MetadataBuildingOptionsAccess to any implicit cacheAccessType.- Specified by:
getImplicitCacheAccessTypein interfaceMetadataBuildingOptions- Returns:
- The implicit cache
AccessType - See Also:
CacheSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY
-
isMultiTenancyEnabled
public boolean isMultiTenancyEnabled()
Description copied from interface:MetadataBuildingOptionsIs multi-tenancy enabled?Multi-tenancy is enabled implicitly if a
MultiTenantConnectionProvideris available.- Specified by:
isMultiTenancyEnabledin interfaceMetadataBuildingOptions- Returns:
trueis multi-tenancy is enabled- See Also:
MultiTenancySettings.MULTI_TENANT_CONNECTION_PROVIDER
-
ignoreExplicitDiscriminatorsForJoinedInheritance
public boolean ignoreExplicitDiscriminatorsForJoinedInheritance()
Description copied from interface:MetadataBuildingOptionsWhether explicit discriminator declarations should be ignored for joined subclass style inheritance.- Specified by:
ignoreExplicitDiscriminatorsForJoinedInheritancein interfaceMetadataBuildingOptions- Returns:
trueindicates they should be ignored;falseindicates 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:MetadataBuildingOptionsWhether we should do discrimination implicitly joined subclass style inheritance when no discriminator info is provided.- Specified by:
createImplicitDiscriminatorsForJoinedInheritancein interfaceMetadataBuildingOptions- Returns:
trueindicates we should do discrimination;falsewe should not.- See Also:
MetadataBuilder.enableImplicitDiscriminatorsForJoinedSubclassSupport(boolean),MappingSettings.IMPLICIT_DISCRIMINATOR_COLUMNS_FOR_JOINED_SUBCLASS
-
shouldImplicitlyForceDiscriminatorInSelect
public boolean shouldImplicitlyForceDiscriminatorInSelect()
Description copied from interface:MetadataBuildingOptionsWhether 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:
shouldImplicitlyForceDiscriminatorInSelectin interfaceMetadataBuildingOptions- Returns:
trueindicates 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:MetadataBuildingOptionsShould we use nationalized variants of character data by default?For example, should
NVARCHARbe used in preference toVARCHAR?- Specified by:
useNationalizedCharacterDatain interfaceMetadataBuildingOptions- Returns:
trueif nationalized character data should be used by default;falseotherwise.- See Also:
MetadataBuilder.enableGlobalNationalizedCharacterDataSupport(boolean),MappingSettings.USE_NATIONALIZED_CHARACTER_DATA
-
isSpecjProprietarySyntaxEnabled
public boolean isSpecjProprietarySyntaxEnabled()
- Specified by:
isSpecjProprietarySyntaxEnabledin interfaceMetadataBuildingOptions
-
isNoConstraintByDefault
public boolean isNoConstraintByDefault()
Description copied from interface:MetadataBuildingOptionsShould we disable constraint creation whenConstraintMode.PROVIDER_DEFAULT?- Specified by:
isNoConstraintByDefaultin interfaceMetadataBuildingOptions- Returns:
trueif we should not create constraints by default;falseif we should.- See Also:
ConstraintMode.PROVIDER_DEFAULT,SchemaToolingSettings.HBM2DDL_DEFAULT_CONSTRAINT_MODE
-
getSourceProcessOrdering
public List<MetadataSourceType> getSourceProcessOrdering()
Description copied from interface:MetadataBuildingOptionsRetrieve the ordering in which sources should be processed.- Specified by:
getSourceProcessOrderingin interfaceMetadataBuildingOptions- Returns:
- The order in which sources should be processed.
- See Also:
MappingSettings.ARTIFACT_PROCESSING_ORDER
-
getSchemaCharset
public String getSchemaCharset()
- Specified by:
getSchemaCharsetin interfaceMetadataBuildingOptions- See Also:
SchemaToolingSettings.HBM2DDL_CHARSET_NAME
-
isXmlMappingEnabled
public boolean isXmlMappingEnabled()
- Specified by:
isXmlMappingEnabledin interfaceMetadataBuildingOptions- See Also:
MappingSettings.XML_MAPPING_ENABLED
-
isAllowExtensionsInCdi
public boolean isAllowExtensionsInCdi()
Description copied from interface:MetadataBuildingOptionsCheck to see if extensions can be hosted in CDI- Specified by:
isAllowExtensionsInCdiin interfaceMetadataBuildingOptions
-
apply
public void apply(JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults)
Yuck. This is needed because JPA lets users define "global building options" inorm.xmlmappings. Forget that there are generally multipleorm.xmlmappings if using XML approach... Ugh- Specified by:
applyin interfaceJpaOrmXmlPersistenceUnitDefaultAware- Parameters:
jpaOrmXmlPersistenceUnitDefaults- Thepersistence-unit-defaultsvalues
-
setBootstrapContext
public void setBootstrapContext(BootstrapContext bootstrapContext)
-
-