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, boolean isProcedureOrNativeQuery, SessionFactoryImplementor sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidReturns the part of the foreign key that is currently being resolved, ornullif no foreign key is currently being resolved.intAccess to the SQL alias helperThe underlying state for SQL AST creationbooleanbooleanvoidvoidregisterLockMode(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 expressionvoidsetCurrentlyResolvingForeignKeyPart(ForeignKeyDescriptor.Nature currentlyResolvingForeignKeySide) voidsetResolvingCircularFetch(boolean resolvingCircularFetch) visitFetches(FetchParent fetchParent) Visit fetches for the given parent.visitIdentifierFetch(EntityResultGraphNode fetchParent) voidwithExplicitFetchMementoResolver(Function<Fetchable, FetchBuilder> resolver, Runnable runnable) <R> RwithNestedFetchParent(FetchParent fetchParent, Function<FetchParent, R> action) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.sql.results.graph.DomainResultCreationState
forceIdentifierSelection, isAssociationKeyVisited, isRegisteringVisitedAssociationKeys, registerVisitedAssociationKey, removeVisitedAssociationKey, visitDiscriminatorFetch, visitEmbeddableDiscriminatorFetch, visitNestedFetchesMethods inherited from interface org.hibernate.sql.ast.spi.SqlAstCreationState
applyOrdering, getSqmCreationContext, registerEntityNameUsage, supportsEntityNameUsageMethods inherited from interface org.hibernate.sql.ast.spi.SqlAstProcessingState
isTopLevelMethods 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, boolean isProcedureOrNativeQuery, 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:
getFromClauseAccessin interfaceSqlAstCreationState
-
getSqlAstCreationState
Description copied from interface:DomainResultCreationStateThe underlying state for SQL AST creation- Specified by:
getSqlAstCreationStatein interfaceDomainResultCreationState- Specified by:
getSqlAstCreationStatein interfaceSqlAstProcessingState
-
getSqlAliasBaseManager
Description copied from interface:DomainResultCreationStateAccess to the SQL alias helper- Specified by:
getSqlAliasBaseManagerin interfaceDomainResultCreationState
-
getSqlExpressionResolver
- Specified by:
getSqlExpressionResolverin interfaceSqlAstCreationState- Specified by:
getSqlExpressionResolverin interfaceSqlAstProcessingState
-
registerLockMode
- Specified by:
registerLockModein interfaceSqlAstCreationState
-
getRegisteredLockModes
-
getCurrentProcessingState
- Specified by:
getCurrentProcessingStatein interfaceSqlAstCreationState
-
getCreationContext
- Specified by:
getCreationContextin interfaceSqlAstCreationState
-
getSqlAliasBaseGenerator
- Specified by:
getSqlAliasBaseGeneratorin interfaceSqlAstCreationState
-
getLoadQueryInfluencers
- Specified by:
getLoadQueryInfluencersin interfaceSqlAstCreationState
-
applyOnlyLoadByKeyFilters
public boolean applyOnlyLoadByKeyFilters()- Specified by:
applyOnlyLoadByKeyFiltersin interfaceSqlAstCreationState
-
getParentState
- Specified by:
getParentStatein interfaceSqlAstProcessingState
-
resolveSqlExpression
public Expression resolveSqlExpression(SqlExpressionResolver.ColumnReferenceKey key, Function<SqlAstProcessingState, Expression> creator) Description copied from interface:SqlExpressionResolverGiven a qualifier + a qualifiableSqlExpressible, resolve the (Sql)Expression reference.- Specified by:
resolveSqlExpressionin interfaceSqlExpressionResolver
-
resolveSqlSelection
public SqlSelection resolveSqlSelection(Expression expression, JavaType<?> javaType, FetchParent fetchParent, TypeConfiguration typeConfiguration) Description copied from interface:SqlExpressionResolverResolve the SqlSelection for the given expression- Specified by:
resolveSqlSelectionin interfaceSqlExpressionResolver
-
withNestedFetchParent
- Specified by:
withNestedFetchParentin interfaceDomainResultCreationState
-
visitIdentifierFetch
- Specified by:
visitIdentifierFetchin interfaceDomainResultCreationState
-
visitFetches
Description copied from interface:DomainResultCreationStateVisit 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:
visitFetchesin interfaceDomainResultCreationState
-
isResolvingCircularFetch
public boolean isResolvingCircularFetch()- Specified by:
isResolvingCircularFetchin interfaceDomainResultCreationState
-
setResolvingCircularFetch
public void setResolvingCircularFetch(boolean resolvingCircularFetch) - Specified by:
setResolvingCircularFetchin interfaceDomainResultCreationState
-
getCurrentlyResolvingForeignKeyPart
Description copied from interface:DomainResultCreationStateReturns the part of the foreign key that is currently being resolved, ornullif no foreign key is currently being resolved.- Specified by:
getCurrentlyResolvingForeignKeyPartin interfaceDomainResultCreationState
-
setCurrentlyResolvingForeignKeyPart
public void setCurrentlyResolvingForeignKeyPart(ForeignKeyDescriptor.Nature currentlyResolvingForeignKeySide) - Specified by:
setCurrentlyResolvingForeignKeyPartin interfaceDomainResultCreationState
-
isProcedureOrNativeQuery
public boolean isProcedureOrNativeQuery()- Specified by:
isProcedureOrNativeQueryin interfaceSqlAstCreationState
-