Package org.hibernate.query.results
Class DomainResultCreationStateImpl
java.lang.Object
org.hibernate.query.results.DomainResultCreationStateImpl
- All Implemented Interfaces:
SqlAstCreationState
,SqlAstProcessingState
,SqlExpressionResolver
,DomainResultCreationState
@Internal
public class DomainResultCreationStateImpl
extends Object
implements DomainResultCreationState, SqlAstCreationState, SqlAstProcessingState, SqlExpressionResolver
-
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<String, DynamicFetchBuilderLegacy>> legacyFetchBuilders, Consumer<SqlSelection> sqlSelectionConsumer, LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
boolean
Whether forcing the selection of the identifier is in effect for this creationReturns 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
isAssociationKeyVisited
(AssociationKey associationKey) Checks whether the given circularityKey is registeredboolean
void
void
registerLockMode
(String identificationVariable, LockMode explicitLockMode) boolean
registerVisitedAssociationKey
(AssociationKey associationKey) Registers a circularity detection keyresolveModelPart
(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<String, 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
isRegisteringVisitedAssociationKeys, removeVisitedAssociationKey, visitDiscriminatorFetch, visitEmbeddableDiscriminatorFetch, visitNestedFetches
Methods inherited from interface org.hibernate.sql.ast.spi.SqlAstCreationState
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<String, DynamicFetchBuilderLegacy>> legacyFetchBuilders, Consumer<SqlSelection> sqlSelectionConsumer, LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory)
-
-
Method Details
-
getLegacyFetchResolver
-
getSessionFactory
-
getNumberOfProcessedSelections
public int getNumberOfProcessedSelections() -
arePositionalSelectionsAllowed
public boolean arePositionalSelectionsAllowed() -
disallowPositionalSelections
public void disallowPositionalSelections() -
getJdbcResultsMetadata
-
getCurrentRelativePath
-
pushExplicitFetchMementoResolver
-
getCurrentExplicitFetchMementoResolver
-
popExplicitFetchMementoResolver
-
withExplicitFetchMementoResolver
public void withExplicitFetchMementoResolver(Function<String, 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
-
forceIdentifierSelection
public boolean forceIdentifierSelection()Description copied from interface:DomainResultCreationState
Whether forcing the selection of the identifier is in effect for this creation- Specified by:
forceIdentifierSelection
in interfaceDomainResultCreationState
-
registerVisitedAssociationKey
Description copied from interface:DomainResultCreationState
Registers a circularity detection key- Specified by:
registerVisitedAssociationKey
in interfaceDomainResultCreationState
-
isAssociationKeyVisited
Description copied from interface:DomainResultCreationState
Checks whether the given circularityKey is registered- Specified by:
isAssociationKeyVisited
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
-