Package org.hibernate.sql.ast.spi
Interface SqlAstCreationContext
- All Superinterfaces:
BindingContext
- All Known Subinterfaces:
SqlTranslationEngine
- All Known Implementing Classes:
SqlTranslationEngineImpl
The "context" in which creation of SQL AST occurs. Provides
access to stuff generally needed when creating SQL AST nodes
Because we would like to be able to render SQL during the
startup cycle, before the SessionFactory is completely
initialized, code involved in SQL AST creation and rendering
should avoid making use of the SessionFactory.
Instead, use the objects exposed by this creation context.
-
Method Summary
Modifier and TypeMethodDescriptiondefault DialectObtain theDialect.getFetchProfile(String name) Obtain the definition of a namedFetchProfile.The runtimeMappingMetamodelImplementorWhen creatingFetchreferences, defines a limit to how deep we should join for fetches.Deprecated.default SqmFunctionRegistryObtain theSqmFunctionRegistry.default WrapperOptionsObtain the "incomplete"WrapperOptionsthat would be returned bySessionFactoryImplementor.getWrapperOptions().booleanMethods inherited from interface org.hibernate.type.BindingContext
getJpaMetamodel, getTypeConfiguration, resolveExpressible
-
Method Details
-
getSessionFactory
Deprecated.Avoid calling this method directly, as much as possible. SQL AST creation should not depend on the existence of a session factory, so if you need to obtain this object, there's something wrong with the design.Currently this is only called when creating a
TableGroup, but we will introduce a new sort of creation context for that, probably. -
getMappingMetamodel
MappingMetamodelImplementor getMappingMetamodel()The runtimeMappingMetamodelImplementor- Specified by:
getMappingMetamodelin interfaceBindingContext
-
getMaximumFetchDepth
Integer getMaximumFetchDepth()When creatingFetchreferences, defines a limit to how deep we should join for fetches. -
isJpaQueryComplianceEnabled
boolean isJpaQueryComplianceEnabled()- See Also:
-
getFetchProfile
Obtain the definition of a namedFetchProfile.- Parameters:
name- The name of the fetch profile
-
getSqmFunctionRegistry
Obtain theSqmFunctionRegistry. -
getDialect
Obtain theDialect. -
getWrapperOptions
Obtain the "incomplete"WrapperOptionsthat would be returned bySessionFactoryImplementor.getWrapperOptions().
-