Package org.hibernate.boot.spi
Class AbstractDelegatingMetadataBuildingOptions
- java.lang.Object
-
- org.hibernate.boot.spi.AbstractDelegatingMetadataBuildingOptions
-
- All Implemented Interfaces:
JpaOrmXmlPersistenceUnitDefaultAware,MetadataBuildingOptions
public abstract class AbstractDelegatingMetadataBuildingOptions extends Object implements MetadataBuildingOptions, JpaOrmXmlPersistenceUnitDefaultAware
Convenience base class for custom implementors ofMetadataBuildingOptionsusing delegation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.boot.spi.JpaOrmXmlPersistenceUnitDefaultAware
JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults
-
-
Constructor Summary
Constructors Constructor Description AbstractDelegatingMetadataBuildingOptions(MetadataBuildingOptions delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults)Apply theorm.xml-definedpersistence-unit-defaultsvalues.booleancreateImplicitDiscriminatorsForJoinedInheritance()Whether we should do discrimination implicitly joined subclass style inheritance when no discriminator info is provided.protected MetadataBuildingOptionsdelegate()ArchiveDescriptorFactorygetArchiveDescriptorFactory()Access to the ArchiveDescriptorFactory to be used for scanningList<AttributeConverterInfo>getAttributeConverters()Access to collected AttributeConverter definitions.List<AuxiliaryDatabaseObject>getAuxiliaryDatabaseObjectList()Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder.List<BasicTypeRegistration>getBasicTypeRegistrations()Access the list of BasicType registrations.List<CacheRegionDefinition>getCacheRegionDefinitions()Access to all explicit cache region mappings.IdGeneratorStrategyInterpretergetIdGenerationTypeInterpreter()AccessTypegetImplicitCacheAccessType()Access to any implicit cache AccessType.ImplicitNamingStrategygetImplicitNamingStrategy()org.jboss.jandex.IndexViewgetJandexView()Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(org.jboss.jandex.IndexView), if any.MappingDefaultsgetMappingDefaults()Access to the mapping defaults.MultiTenancyStrategygetMultiTenancyStrategy()Access to the MultiTenancyStrategy for this environment.PhysicalNamingStrategygetPhysicalNamingStrategy()org.hibernate.annotations.common.reflection.ReflectionManagergetReflectionManager()Retrieve the Hibernate Commons Annotations ReflectionManager to use.ScanEnvironmentgetScanEnvironment()Access to the environment for scanning.ObjectgetScanner()Access to the Scanner to be used for scanning.ScanOptionsgetScanOptions()Access to the options to be used for scanningStringgetSchemaCharset()StandardServiceRegistrygetServiceRegistry()Access to the service registry.SharedCacheModegetSharedCacheMode()Access to the SharedCacheMode for determining whether we should perform second level caching or not.List<MetadataSourceType>getSourceProcessOrdering()Retrieve the ordering in which sources should be processed.Map<String,SQLFunction>getSqlFunctions()Access to any SQL functions explicitly registered with the MetadataBuilder.ClassLoadergetTempClassLoader()Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader(), if any.booleanignoreExplicitDiscriminatorsForJoinedInheritance()Whether explicit discriminator declarations should be ignored for joined subclass style inheritance.booleanisNoConstraintByDefault()Should we create constraint by default?booleanisSpecjProprietarySyntaxEnabled()booleanisXmlMappingEnabled()booleanshouldImplicitlyForceDiscriminatorInSelect()Whether we should implicitly force discriminators into SQL selects.booleanuseNationalizedCharacterData()Should we use nationalized variants of character data (e.g.
-
-
-
Constructor Detail
-
AbstractDelegatingMetadataBuildingOptions
public AbstractDelegatingMetadataBuildingOptions(MetadataBuildingOptions delegate)
-
-
Method Detail
-
delegate
protected MetadataBuildingOptions delegate()
-
getServiceRegistry
public StandardServiceRegistry getServiceRegistry()
Description copied from interface:MetadataBuildingOptionsAccess to the service registry.- Specified by:
getServiceRegistryin interfaceMetadataBuildingOptions- Returns:
- The service registry
-
getMappingDefaults
public MappingDefaults getMappingDefaults()
Description copied from interface:MetadataBuildingOptionsAccess to the mapping defaults.- Specified by:
getMappingDefaultsin interfaceMetadataBuildingOptions- Returns:
- The mapping defaults
-
getBasicTypeRegistrations
public List<BasicTypeRegistration> getBasicTypeRegistrations()
Description copied from interface:MetadataBuildingOptionsAccess the list of BasicType registrations. These are the BasicTypes explicitly registered via calls to:MetadataBuilder.applyBasicType(org.hibernate.type.BasicType)MetadataBuilder.applyBasicType(org.hibernate.type.BasicType, String[])MetadataBuilder.applyBasicType(org.hibernate.usertype.UserType, java.lang.String[])MetadataBuilder.applyBasicType(org.hibernate.usertype.CompositeUserType, java.lang.String[])
- Specified by:
getBasicTypeRegistrationsin interfaceMetadataBuildingOptions- Returns:
- The BasicType registrations
-
getJandexView
public org.jboss.jandex.IndexView getJandexView()
Description copied from interface:MetadataBuildingOptionsAccess to the Jandex index passed by call toMetadataBuilder.applyIndexView(org.jboss.jandex.IndexView), if any.- Specified by:
getJandexViewin interfaceMetadataBuildingOptions- Returns:
- The Jandex index
-
getScanOptions
public ScanOptions getScanOptions()
Description copied from interface:MetadataBuildingOptionsAccess to the options to be used for scanning- Specified by:
getScanOptionsin interfaceMetadataBuildingOptions- Returns:
- The scan options
-
getScanEnvironment
public ScanEnvironment getScanEnvironment()
Description copied from interface:MetadataBuildingOptionsAccess to the environment for scanning. Consider this temporary; see discussion onScanEnvironment- Specified by:
getScanEnvironmentin interfaceMetadataBuildingOptions- Returns:
- The scan environment
-
getScanner
public Object getScanner()
Description copied from interface:MetadataBuildingOptionsAccess 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
- Specified by:
getScannerin interfaceMetadataBuildingOptions- Returns:
- The scanner
-
getArchiveDescriptorFactory
public ArchiveDescriptorFactory getArchiveDescriptorFactory()
Description copied from interface:MetadataBuildingOptionsAccess to the ArchiveDescriptorFactory to be used for scanning- Specified by:
getArchiveDescriptorFactoryin interfaceMetadataBuildingOptions- Returns:
- The ArchiveDescriptorFactory
-
getTempClassLoader
public ClassLoader getTempClassLoader()
Description copied from interface:MetadataBuildingOptionsAccess the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader(), if any.- Specified by:
getTempClassLoaderin interfaceMetadataBuildingOptions- Returns:
- The tempo ClassLoader
-
getImplicitNamingStrategy
public ImplicitNamingStrategy getImplicitNamingStrategy()
- Specified by:
getImplicitNamingStrategyin interfaceMetadataBuildingOptions
-
getPhysicalNamingStrategy
public PhysicalNamingStrategy getPhysicalNamingStrategy()
- Specified by:
getPhysicalNamingStrategyin interfaceMetadataBuildingOptions
-
getReflectionManager
public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Description copied from interface:MetadataBuildingOptionsRetrieve the Hibernate Commons Annotations ReflectionManager to use.- Specified by:
getReflectionManagerin interfaceMetadataBuildingOptions- Returns:
- The Hibernate Commons Annotations ReflectionManager to use.
-
getSharedCacheMode
public SharedCacheMode getSharedCacheMode()
Description copied from interface:MetadataBuildingOptionsAccess to the SharedCacheMode for determining whether we should perform second level caching or not.- Specified by:
getSharedCacheModein interfaceMetadataBuildingOptions- Returns:
- The SharedCacheMode
-
getImplicitCacheAccessType
public AccessType getImplicitCacheAccessType()
Description copied from interface:MetadataBuildingOptionsAccess to any implicit cache AccessType.- Specified by:
getImplicitCacheAccessTypein interfaceMetadataBuildingOptions- Returns:
- The implicit cache AccessType
-
getMultiTenancyStrategy
public MultiTenancyStrategy getMultiTenancyStrategy()
Description copied from interface:MetadataBuildingOptionsAccess to the MultiTenancyStrategy for this environment.- Specified by:
getMultiTenancyStrategyin interfaceMetadataBuildingOptions- Returns:
- The MultiTenancyStrategy
-
getIdGenerationTypeInterpreter
public IdGeneratorStrategyInterpreter getIdGenerationTypeInterpreter()
- Specified by:
getIdGenerationTypeInterpreterin interfaceMetadataBuildingOptions
-
getCacheRegionDefinitions
public List<CacheRegionDefinition> getCacheRegionDefinitions()
Description copied from interface:MetadataBuildingOptionsAccess to all explicit cache region mappings.- Specified by:
getCacheRegionDefinitionsin interfaceMetadataBuildingOptions- Returns:
- Explicit cache region mappings.
-
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),AvailableSettings.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),AvailableSettings.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:
AvailableSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
-
useNationalizedCharacterData
public boolean useNationalizedCharacterData()
Description copied from interface:MetadataBuildingOptionsShould we use nationalized variants of character data (e.g. NVARCHAR rather than VARCHAR) by default?- Specified by:
useNationalizedCharacterDatain interfaceMetadataBuildingOptions- Returns:
trueif nationalized character data should be used by default;falseotherwise.- See Also:
MetadataBuilder.enableGlobalNationalizedCharacterDataSupport(boolean),AvailableSettings.USE_NATIONALIZED_CHARACTER_DATA
-
isSpecjProprietarySyntaxEnabled
public boolean isSpecjProprietarySyntaxEnabled()
- Specified by:
isSpecjProprietarySyntaxEnabledin interfaceMetadataBuildingOptions
-
isNoConstraintByDefault
public boolean isNoConstraintByDefault()
Description copied from interface:MetadataBuildingOptionsShould we create constraint by default?- Specified by:
isNoConstraintByDefaultin interfaceMetadataBuildingOptions- Returns:
trueif not create constraint by default;falseotherwise.- See Also:
ConstraintMode.PROVIDER_DEFAULT,org.hibernate.cfg.AvailableSettings#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.
-
getSqlFunctions
public Map<String,SQLFunction> getSqlFunctions()
Description copied from interface:MetadataBuildingOptionsAccess to any SQL functions explicitly registered with the MetadataBuilder. This does not include Dialect defined functions, etc.- Specified by:
getSqlFunctionsin interfaceMetadataBuildingOptions- Returns:
- The SQLFunctions registered through MetadataBuilder
-
getAuxiliaryDatabaseObjectList
public List<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Description copied from interface:MetadataBuildingOptionsAccess to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder. This does not include AuxiliaryDatabaseObject defined in mappings.- Specified by:
getAuxiliaryDatabaseObjectListin interfaceMetadataBuildingOptions- Returns:
- The AuxiliaryDatabaseObject registered through MetadataBuilder
-
getAttributeConverters
public List<AttributeConverterInfo> getAttributeConverters()
Description copied from interface:MetadataBuildingOptionsAccess to collected AttributeConverter definitions.- Specified by:
getAttributeConvertersin interfaceMetadataBuildingOptions- Returns:
- The AttributeConverterInfo registered through MetadataBuilder
-
apply
public void apply(JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults)
Description copied from interface:JpaOrmXmlPersistenceUnitDefaultAwareApply theorm.xml-definedpersistence-unit-defaultsvalues.- Specified by:
applyin interfaceJpaOrmXmlPersistenceUnitDefaultAware- Parameters:
jpaOrmXmlPersistenceUnitDefaults- Thepersistence-unit-defaultsvalues
-
getSchemaCharset
public String getSchemaCharset()
- Specified by:
getSchemaCharsetin interfaceMetadataBuildingOptions
-
isXmlMappingEnabled
public boolean isXmlMappingEnabled()
- Specified by:
isXmlMappingEnabledin interfaceMetadataBuildingOptions
-
-