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 java.lang.Object implements MetadataBuildingOptions, JpaOrmXmlPersistenceUnitDefaultAware
Convenience base class for custom implementors ofMetadataBuildingOptions
using 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 void
apply(JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults)
Apply theorm.xml
-definedpersistence-unit-defaults
values.boolean
createImplicitDiscriminatorsForJoinedInheritance()
Whether we should do discrimination implicitly joined subclass style inheritance when no discriminator info is provided.protected MetadataBuildingOptions
delegate()
ArchiveDescriptorFactory
getArchiveDescriptorFactory()
Access to the ArchiveDescriptorFactory to be used for scanningjava.util.List<AttributeConverterInfo>
getAttributeConverters()
Access to collected AttributeConverter definitions.java.util.List<AuxiliaryDatabaseObject>
getAuxiliaryDatabaseObjectList()
Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder.java.util.List<BasicTypeRegistration>
getBasicTypeRegistrations()
Access the list of BasicType registrations.java.util.List<CacheRegionDefinition>
getCacheRegionDefinitions()
Access to all explicit cache region mappings.IdGeneratorStrategyInterpreter
getIdGenerationTypeInterpreter()
AccessType
getImplicitCacheAccessType()
Access to any implicit cache AccessType.ImplicitNamingStrategy
getImplicitNamingStrategy()
org.jboss.jandex.IndexView
getJandexView()
Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(org.jboss.jandex.IndexView)
, if any.MappingDefaults
getMappingDefaults()
Access to the mapping defaults.MultiTenancyStrategy
getMultiTenancyStrategy()
Access to the MultiTenancyStrategy for this environment.PhysicalNamingStrategy
getPhysicalNamingStrategy()
org.hibernate.annotations.common.reflection.ReflectionManager
getReflectionManager()
Retrieve the Hibernate Commons Annotations ReflectionManager to use.ScanEnvironment
getScanEnvironment()
Access to the environment for scanning.java.lang.Object
getScanner()
Access to the Scanner to be used for scanning.ScanOptions
getScanOptions()
Access to the options to be used for scanningjava.lang.String
getSchemaCharset()
StandardServiceRegistry
getServiceRegistry()
Access to the service registry.SharedCacheMode
getSharedCacheMode()
Access to the SharedCacheMode for determining whether we should perform second level caching or not.java.util.List<MetadataSourceType>
getSourceProcessOrdering()
Retrieve the ordering in which sources should be processed.java.util.Map<java.lang.String,SQLFunction>
getSqlFunctions()
Access to any SQL functions explicitly registered with the MetadataBuilder.java.lang.ClassLoader
getTempClassLoader()
Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.boolean
ignoreExplicitDiscriminatorsForJoinedInheritance()
Whether explicit discriminator declarations should be ignored for joined subclass style inheritance.boolean
isNoConstraintByDefault()
Should we create constraint by default?boolean
isSpecjProprietarySyntaxEnabled()
boolean
isXmlMappingEnabled()
boolean
shouldImplicitlyForceDiscriminatorInSelect()
Whether we should implicitly force discriminators into SQL selects.boolean
useNationalizedCharacterData()
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:MetadataBuildingOptions
Access to the service registry.- Specified by:
getServiceRegistry
in interfaceMetadataBuildingOptions
- Returns:
- The service registry
-
getMappingDefaults
public MappingDefaults getMappingDefaults()
Description copied from interface:MetadataBuildingOptions
Access to the mapping defaults.- Specified by:
getMappingDefaults
in interfaceMetadataBuildingOptions
- Returns:
- The mapping defaults
-
getBasicTypeRegistrations
public java.util.List<BasicTypeRegistration> getBasicTypeRegistrations()
Description copied from interface:MetadataBuildingOptions
Access 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:
getBasicTypeRegistrations
in interfaceMetadataBuildingOptions
- Returns:
- The BasicType registrations
-
getJandexView
public org.jboss.jandex.IndexView getJandexView()
Description copied from interface:MetadataBuildingOptions
Access to the Jandex index passed by call toMetadataBuilder.applyIndexView(org.jboss.jandex.IndexView)
, if any.- Specified by:
getJandexView
in interfaceMetadataBuildingOptions
- Returns:
- The Jandex index
-
getScanOptions
public ScanOptions getScanOptions()
Description copied from interface:MetadataBuildingOptions
Access to the options to be used for scanning- Specified by:
getScanOptions
in interfaceMetadataBuildingOptions
- Returns:
- The scan options
-
getScanEnvironment
public ScanEnvironment getScanEnvironment()
Description copied from interface:MetadataBuildingOptions
Access to the environment for scanning. Consider this temporary; see discussion onScanEnvironment
- Specified by:
getScanEnvironment
in interfaceMetadataBuildingOptions
- Returns:
- The scan environment
-
getScanner
public java.lang.Object getScanner()
Description copied from interface:MetadataBuildingOptions
Access 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:
getScanner
in interfaceMetadataBuildingOptions
- Returns:
- The scanner
-
getArchiveDescriptorFactory
public ArchiveDescriptorFactory getArchiveDescriptorFactory()
Description copied from interface:MetadataBuildingOptions
Access to the ArchiveDescriptorFactory to be used for scanning- Specified by:
getArchiveDescriptorFactory
in interfaceMetadataBuildingOptions
- Returns:
- The ArchiveDescriptorFactory
-
getTempClassLoader
public java.lang.ClassLoader getTempClassLoader()
Description copied from interface:MetadataBuildingOptions
Access the temporary ClassLoader passed to us as defined byPersistenceUnitInfo.getNewTempClassLoader()
, if any.- Specified by:
getTempClassLoader
in interfaceMetadataBuildingOptions
- Returns:
- The tempo ClassLoader
-
getImplicitNamingStrategy
public ImplicitNamingStrategy getImplicitNamingStrategy()
- Specified by:
getImplicitNamingStrategy
in interfaceMetadataBuildingOptions
-
getPhysicalNamingStrategy
public PhysicalNamingStrategy getPhysicalNamingStrategy()
- Specified by:
getPhysicalNamingStrategy
in interfaceMetadataBuildingOptions
-
getReflectionManager
public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()
Description copied from interface:MetadataBuildingOptions
Retrieve the Hibernate Commons Annotations ReflectionManager to use.- Specified by:
getReflectionManager
in interfaceMetadataBuildingOptions
- Returns:
- The Hibernate Commons Annotations ReflectionManager to use.
-
getSharedCacheMode
public SharedCacheMode getSharedCacheMode()
Description copied from interface:MetadataBuildingOptions
Access to the SharedCacheMode for determining whether we should perform second level caching or not.- Specified by:
getSharedCacheMode
in interfaceMetadataBuildingOptions
- Returns:
- The SharedCacheMode
-
getImplicitCacheAccessType
public AccessType getImplicitCacheAccessType()
Description copied from interface:MetadataBuildingOptions
Access to any implicit cache AccessType.- Specified by:
getImplicitCacheAccessType
in interfaceMetadataBuildingOptions
- Returns:
- The implicit cache AccessType
-
getMultiTenancyStrategy
public MultiTenancyStrategy getMultiTenancyStrategy()
Description copied from interface:MetadataBuildingOptions
Access to the MultiTenancyStrategy for this environment.- Specified by:
getMultiTenancyStrategy
in interfaceMetadataBuildingOptions
- Returns:
- The MultiTenancyStrategy
-
getIdGenerationTypeInterpreter
public IdGeneratorStrategyInterpreter getIdGenerationTypeInterpreter()
- Specified by:
getIdGenerationTypeInterpreter
in interfaceMetadataBuildingOptions
-
getCacheRegionDefinitions
public java.util.List<CacheRegionDefinition> getCacheRegionDefinitions()
Description copied from interface:MetadataBuildingOptions
Access to all explicit cache region mappings.- Specified by:
getCacheRegionDefinitions
in interfaceMetadataBuildingOptions
- Returns:
- Explicit cache region mappings.
-
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)
,AvailableSettings.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)
,AvailableSettings.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:
AvailableSettings.FORCE_DISCRIMINATOR_IN_SELECTS_BY_DEFAULT
-
useNationalizedCharacterData
public boolean useNationalizedCharacterData()
Description copied from interface:MetadataBuildingOptions
Should we use nationalized variants of character data (e.g. NVARCHAR rather than VARCHAR) by default?- Specified by:
useNationalizedCharacterData
in interfaceMetadataBuildingOptions
- Returns:
true
if nationalized character data should be used by default;false
otherwise.- See Also:
MetadataBuilder.enableGlobalNationalizedCharacterDataSupport(boolean)
,AvailableSettings.USE_NATIONALIZED_CHARACTER_DATA
-
isSpecjProprietarySyntaxEnabled
public boolean isSpecjProprietarySyntaxEnabled()
- Specified by:
isSpecjProprietarySyntaxEnabled
in interfaceMetadataBuildingOptions
-
isNoConstraintByDefault
public boolean isNoConstraintByDefault()
Description copied from interface:MetadataBuildingOptions
Should we create constraint by default?- Specified by:
isNoConstraintByDefault
in interfaceMetadataBuildingOptions
- Returns:
true
if not create constraint by default;false
otherwise.- See Also:
ConstraintMode.PROVIDER_DEFAULT
,org.hibernate.cfg.AvailableSettings#DEFAULT_CONSTRAINT_MODE
-
getSourceProcessOrdering
public java.util.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.
-
getSqlFunctions
public java.util.Map<java.lang.String,SQLFunction> getSqlFunctions()
Description copied from interface:MetadataBuildingOptions
Access to any SQL functions explicitly registered with the MetadataBuilder. This does not include Dialect defined functions, etc.- Specified by:
getSqlFunctions
in interfaceMetadataBuildingOptions
- Returns:
- The SQLFunctions registered through MetadataBuilder
-
getAuxiliaryDatabaseObjectList
public java.util.List<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjectList()
Description copied from interface:MetadataBuildingOptions
Access to any AuxiliaryDatabaseObject explicitly registered with the MetadataBuilder. This does not include AuxiliaryDatabaseObject defined in mappings.- Specified by:
getAuxiliaryDatabaseObjectList
in interfaceMetadataBuildingOptions
- Returns:
- The AuxiliaryDatabaseObject registered through MetadataBuilder
-
getAttributeConverters
public java.util.List<AttributeConverterInfo> getAttributeConverters()
Description copied from interface:MetadataBuildingOptions
Access to collected AttributeConverter definitions.- Specified by:
getAttributeConverters
in interfaceMetadataBuildingOptions
- Returns:
- The AttributeConverterInfo registered through MetadataBuilder
-
apply
public void apply(JpaOrmXmlPersistenceUnitDefaultAware.JpaOrmXmlPersistenceUnitDefaults jpaOrmXmlPersistenceUnitDefaults)
Description copied from interface:JpaOrmXmlPersistenceUnitDefaultAware
Apply theorm.xml
-definedpersistence-unit-defaults
values.- Specified by:
apply
in interfaceJpaOrmXmlPersistenceUnitDefaultAware
- Parameters:
jpaOrmXmlPersistenceUnitDefaults
- Thepersistence-unit-defaults
values
-
getSchemaCharset
public java.lang.String getSchemaCharset()
- Specified by:
getSchemaCharset
in interfaceMetadataBuildingOptions
-
isXmlMappingEnabled
public boolean isXmlMappingEnabled()
- Specified by:
isXmlMappingEnabled
in interfaceMetadataBuildingOptions
-
-