Class DomainResultCreationStateImpl
java.lang.Object
org.hibernate.query.results.internal.DomainResultCreationStateImpl
- All Implemented Interfaces:
SqlAstCreationState
,SqlAstProcessingState
,SqlExpressionResolver
,DomainResultCreationState
@Internal
public class DomainResultCreationStateImpl
extends Object
implements DomainResultCreationState, SqlAstCreationState, SqlAstProcessingState, SqlExpressionResolver
Central implementation of DomainResultCreationState,
SqlAstCreationState, SqlAstProcessingState and
SqlExpressionResolver used while building
ResultSetMapping references.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.sql.ast.spi.SqlExpressionResolver
SqlExpressionResolver.ColumnReferenceKey
-
Constructor Summary
ConstructorsConstructorDescriptionDomainResultCreationStateImpl
(String stateIdentifier, JdbcValuesMetadata jdbcResultsMetadata, Map<String, Map<Fetchable, LegacyFetchBuilder>> legacyFetchBuilders, Consumer<SqlSelection> sqlSelectionConsumer, LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
Returns the part of the foreign key that is currently being resolved, ornull
if no foreign key is currently being resolved.int
Access to the SQL alias helperThe underlying state for SQL AST creationboolean
void
void
registerLockMode
(String identificationVariable, LockMode explicitLockMode) resolveModelPart
(NavigablePath navigablePath) Resolve the ModelPart associated with a given NavigablePath.resolveSqlExpression
(SqlExpressionResolver.ColumnReferenceKey key, Function<SqlAstProcessingState, Expression> creator) Given a qualifier + a qualifiableSqlExpressible
, resolve the (Sql)Expression reference.resolveSqlSelection
(Expression expression, JavaType<?> javaType, FetchParent fetchParent, TypeConfiguration typeConfiguration) Resolve the SqlSelection for the given expressionvoid
setCurrentlyResolvingForeignKeyPart
(ForeignKeyDescriptor.Nature currentlyResolvingForeignKeySide) void
setResolvingCircularFetch
(boolean resolvingCircularFetch) visitFetches
(FetchParent fetchParent) Visit fetches for the given parent.visitIdentifierFetch
(EntityResultGraphNode fetchParent) void
withExplicitFetchMementoResolver
(Function<Fetchable, FetchBuilder> resolver, Runnable runnable) <R> R
withNestedFetchParent
(FetchParent fetchParent, Function<FetchParent, R> action) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.sql.results.graph.DomainResultCreationState
forceIdentifierSelection, isAssociationKeyVisited, isRegisteringVisitedAssociationKeys, registerVisitedAssociationKey, removeVisitedAssociationKey, visitDiscriminatorFetch, visitEmbeddableDiscriminatorFetch, visitNestedFetches
Methods inherited from interface org.hibernate.sql.ast.spi.SqlAstCreationState
applyOrdering, registerEntityNameUsage, supportsEntityNameUsage
Methods inherited from interface org.hibernate.sql.ast.spi.SqlAstProcessingState
isTopLevel
Methods inherited from interface org.hibernate.sql.ast.spi.SqlExpressionResolver
resolveSqlExpression
-
Constructor Details
-
DomainResultCreationStateImpl
public DomainResultCreationStateImpl(String stateIdentifier, JdbcValuesMetadata jdbcResultsMetadata, Map<String, Map<Fetchable, LegacyFetchBuilder>> legacyFetchBuilders, Consumer<SqlSelection> sqlSelectionConsumer, LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory)
-
-
Method Details
-
getSessionFactory
-
getNumberOfProcessedSelections
public int getNumberOfProcessedSelections() -
arePositionalSelectionsAllowed
public boolean arePositionalSelectionsAllowed() -
disallowPositionalSelections
public void disallowPositionalSelections() -
getJdbcResultsMetadata
-
pushExplicitFetchMementoResolver
-
getCurrentExplicitFetchMementoResolver
-
popExplicitFetchMementoResolver
-
withExplicitFetchMementoResolver
public void withExplicitFetchMementoResolver(Function<Fetchable, FetchBuilder> resolver, Runnable runnable) -
getFromClauseAccess
- Specified by:
getFromClauseAccess
in interfaceSqlAstCreationState
-
getSqlAstCreationState
Description copied from interface:DomainResultCreationState
The underlying state for SQL AST creation- Specified by:
getSqlAstCreationState
in interfaceDomainResultCreationState
- Specified by:
getSqlAstCreationState
in interfaceSqlAstProcessingState
-
getSqlAliasBaseManager
Description copied from interface:DomainResultCreationState
Access to the SQL alias helper- Specified by:
getSqlAliasBaseManager
in interfaceDomainResultCreationState
-
getSqlExpressionResolver
- Specified by:
getSqlExpressionResolver
in interfaceSqlAstCreationState
- Specified by:
getSqlExpressionResolver
in interfaceSqlAstProcessingState
-
registerLockMode
- Specified by:
registerLockMode
in interfaceSqlAstCreationState
-
getRegisteredLockModes
-
getCurrentProcessingState
- Specified by:
getCurrentProcessingState
in interfaceSqlAstCreationState
-
getCreationContext
- Specified by:
getCreationContext
in interfaceSqlAstCreationState
-
getSqlAliasBaseGenerator
- Specified by:
getSqlAliasBaseGenerator
in interfaceSqlAstCreationState
-
getLoadQueryInfluencers
- Specified by:
getLoadQueryInfluencers
in interfaceSqlAstCreationState
-
applyOnlyLoadByKeyFilters
public boolean applyOnlyLoadByKeyFilters()- Specified by:
applyOnlyLoadByKeyFilters
in interfaceSqlAstCreationState
-
getParentState
- Specified by:
getParentState
in interfaceSqlAstProcessingState
-
resolveSqlExpression
public Expression resolveSqlExpression(SqlExpressionResolver.ColumnReferenceKey key, Function<SqlAstProcessingState, Expression> creator) Description copied from interface:SqlExpressionResolver
Given a qualifier + a qualifiableSqlExpressible
, resolve the (Sql)Expression reference.- Specified by:
resolveSqlExpression
in interfaceSqlExpressionResolver
-
resolveSqlSelection
public SqlSelection resolveSqlSelection(Expression expression, JavaType<?> javaType, FetchParent fetchParent, TypeConfiguration typeConfiguration) Description copied from interface:SqlExpressionResolver
Resolve the SqlSelection for the given expression- Specified by:
resolveSqlSelection
in interfaceSqlExpressionResolver
-
withNestedFetchParent
- Specified by:
withNestedFetchParent
in interfaceDomainResultCreationState
-
visitIdentifierFetch
- Specified by:
visitIdentifierFetch
in interfaceDomainResultCreationState
-
visitFetches
Description copied from interface:DomainResultCreationState
Visit fetches for the given parent. We walk fetches via the SqlAstCreationContext because each "context" will define differently what should be fetched (HQL versus load)- Specified by:
visitFetches
in interfaceDomainResultCreationState
-
isResolvingCircularFetch
public boolean isResolvingCircularFetch()- Specified by:
isResolvingCircularFetch
in interfaceDomainResultCreationState
-
setResolvingCircularFetch
public void setResolvingCircularFetch(boolean resolvingCircularFetch) - Specified by:
setResolvingCircularFetch
in interfaceDomainResultCreationState
-
getCurrentlyResolvingForeignKeyPart
Description copied from interface:DomainResultCreationState
Returns the part of the foreign key that is currently being resolved, ornull
if no foreign key is currently being resolved.- Specified by:
getCurrentlyResolvingForeignKeyPart
in interfaceDomainResultCreationState
-
setCurrentlyResolvingForeignKeyPart
public void setCurrentlyResolvingForeignKeyPart(ForeignKeyDescriptor.Nature currentlyResolvingForeignKeySide) - Specified by:
setCurrentlyResolvingForeignKeyPart
in interfaceDomainResultCreationState
-