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 Dialect
Obtain theDialect
.getFetchProfile
(String name) Obtain the definition of a namedFetchProfile
.The runtimeMappingMetamodelImplementor
When creatingFetch
references, defines a limit to how deep we should join for fetches.Deprecated.default SqmFunctionRegistry
Obtain theSqmFunctionRegistry
.default WrapperOptions
Obtain the "incomplete"WrapperOptions
that would be returned bySessionFactoryImplementor.getWrapperOptions()
.boolean
Methods inherited from interface org.hibernate.query.BindingContext
getJpaMetamodel, getTypeConfiguration
-
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:
getMappingMetamodel
in interfaceBindingContext
-
getMaximumFetchDepth
Integer getMaximumFetchDepth()When creatingFetch
references, defines a limit to how deep we should join for fetches. -
isJpaQueryComplianceEnabled
boolean isJpaQueryComplianceEnabled() -
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"WrapperOptions
that would be returned bySessionFactoryImplementor.getWrapperOptions()
.
-