Interface MetadataBuildingContext
- All Known Subinterfaces:
EnversMetadataBuildingContext, LocalMetadataBuildingContext
public interface MetadataBuildingContext
Describes the context in which the process of building
Metadata
from MetadataSources occurs.
MetadataBuildingContexts are hierarchical: global, persistence unit, document, mapping.
- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault AuditStrategyAccess to the options specified by theMetadataBuilderThe name of the contributor whose mappings we are currently processingAccess to mapping defaults in effect for this contextAccess to the collector of metadata as we build it.Not sure how I feel about this exposed heredefault intdefault intdefault intdefault intdefault intdefault TemporalTableStrategydefault booleanisDirectJavaTimeJdbcAccessEnabled(Class<?> javaTimeType) Determines whether direct JDBC access using the exact Java Time class is enabled by configuration and supported by the Dialect and JDBC driver.default booleanDeprecated.static booleanisPreferJavaTimeJdbcTypesEnabled(ConfigurationService configurationService) static booleanisPreferJavaTimeJdbcTypesEnabled(ServiceRegistry serviceRegistry) default booleanstatic booleanisPreferLocaleLanguageTagEnabled(ConfigurationService configurationService) static booleanisPreferLocaleLanguageTagEnabled(ServiceRegistry serviceRegistry) default booleanstatic booleanisPreferNativeEnumTypesEnabled(ConfigurationService configurationService) static booleanisPreferNativeEnumTypesEnabled(ServiceRegistry serviceRegistry)
-
Method Details
-
getBootstrapContext
BootstrapContext getBootstrapContext() -
getBuildingOptions
Access to the options specified by theMetadataBuilder- Returns:
- The options
- API Note:
- This method will be removed in 9.0.
-
getEffectiveDefaults
EffectiveMappingDefaults getEffectiveDefaults()Access to mapping defaults in effect for this context- Returns:
- The mapping defaults.
-
getMetadataCollector
InFlightMetadataCollector getMetadataCollector()Access to the collector of metadata as we build it.- Returns:
- The metadata collector.
-
getObjectNameNormalizer
ObjectNameNormalizer getObjectNameNormalizer()Not sure how I feel about this exposed here- Returns:
- The ObjectNameNormalizer
-
getPreferredSqlTypeCodeForBoolean
-
getPreferredSqlTypeCodeForDuration
-
getPreferredSqlTypeCodeForUuid
-
getPreferredSqlTypeCodeForInstant
-
getPreferredSqlTypeCodeForArray
-
isDirectJavaTimeJdbcAccessEnabled
@Incubating(since="8.0") @Remove default boolean isDirectJavaTimeJdbcAccessEnabled(Class<?> javaTimeType) Determines whether direct JDBC access using the exact Java Time class is enabled by configuration and supported by the Dialect and JDBC driver.- Parameters:
javaTimeType- the exact Java class to be used at the JDBC boundary- Since:
- 8.0
-
isPreferJavaTimeJdbcTypesEnabled
@Deprecated(since="8.0") @Incubating(since="6.5") @Remove default boolean isPreferJavaTimeJdbcTypesEnabled()Deprecated.UseisDirectJavaTimeJdbcAccessEnabled(Class)when determining whether direct JDBC access should be used for a Java Time type.Returns the resolved value of "hibernate.type.java_time_use_direct_jdbc", after configuration conversion and defaulting, but before accounting for Dialect or JDBC-driver capabilities.Code selecting a JDBC mapping should instead use
isDirectJavaTimeJdbcAccessEnabled(Class). -
isPreferNativeEnumTypesEnabled
-
isPreferLocaleLanguageTagEnabled
-
isPreferJavaTimeJdbcTypesEnabled
-
isPreferNativeEnumTypesEnabled
-
isPreferLocaleLanguageTagEnabled
-
isPreferJavaTimeJdbcTypesEnabled
-
isPreferNativeEnumTypesEnabled
-
isPreferLocaleLanguageTagEnabled
-
getTypeDefinitionRegistry
TypeDefinitionRegistry getTypeDefinitionRegistry() -
getCurrentContributorName
String getCurrentContributorName()The name of the contributor whose mappings we are currently processing -
getTemporalTableStrategy
-
getAuditStrategy
-
isDirectJavaTimeJdbcAccessEnabled(Class)when determining whether direct JDBC access should be used for a Java Time type.