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
Constructors Constructor Description DomainResultCreationStateImpl(String stateIdentifier, JdbcValuesMetadata jdbcResultsMetadata, Map<String,Map<String,DynamicFetchBuilderLegacy>> legacyFetchBuilders, Consumer<SqlSelection> sqlSelectionConsumer, LoadQueryInfluencers loadQueryInfluencers, boolean isProcedureOrNativeQuery, SessionFactoryImplementor sessionFactory)
-
Method Summary
-
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
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 Detail
-
DomainResultCreationStateImpl
public DomainResultCreationStateImpl(String stateIdentifier, JdbcValuesMetadata jdbcResultsMetadata, Map<String,Map<String,DynamicFetchBuilderLegacy>> legacyFetchBuilders, Consumer<SqlSelection> sqlSelectionConsumer, LoadQueryInfluencers loadQueryInfluencers, boolean isProcedureOrNativeQuery, SessionFactoryImplementor sessionFactory)
-
-
Method Detail
-
getLegacyFetchResolver
public LegacyFetchResolver getLegacyFetchResolver()
-
getSessionFactory
public SessionFactoryImplementor getSessionFactory()
-
getNumberOfProcessedSelections
public int getNumberOfProcessedSelections()
-
arePositionalSelectionsAllowed
public boolean arePositionalSelectionsAllowed()
-
disallowPositionalSelections
public void disallowPositionalSelections()
-
getJdbcResultsMetadata
public JdbcValuesMetadata getJdbcResultsMetadata()
-
getCurrentRelativePath
public Map.Entry<String,NavigablePath> getCurrentRelativePath()
-
pushExplicitFetchMementoResolver
public void pushExplicitFetchMementoResolver(Function<String,FetchBuilder> resolver)
-
getCurrentExplicitFetchMementoResolver
public Function<String,FetchBuilder> getCurrentExplicitFetchMementoResolver()
-
popExplicitFetchMementoResolver
public Function<String,FetchBuilder> popExplicitFetchMementoResolver()
-
withExplicitFetchMementoResolver
public void withExplicitFetchMementoResolver(Function<String,FetchBuilder> resolver, Runnable runnable)
-
getFromClauseAccess
public FromClauseAccessImpl getFromClauseAccess()
- Specified by:
getFromClauseAccessin interfaceSqlAstCreationState
-
getSqlAstCreationState
public DomainResultCreationStateImpl getSqlAstCreationState()
Description copied from interface:DomainResultCreationStateThe underlying state for SQL AST creation- Specified by:
getSqlAstCreationStatein interfaceDomainResultCreationState- Specified by:
getSqlAstCreationStatein interfaceSqlAstProcessingState
-
getSqlAliasBaseManager
public SqlAliasBaseManager getSqlAliasBaseManager()
Description copied from interface:DomainResultCreationStateAccess to the SQL alias helper- Specified by:
getSqlAliasBaseManagerin interfaceDomainResultCreationState
-
forceIdentifierSelection
public boolean forceIdentifierSelection()
Description copied from interface:DomainResultCreationStateWhether forcing the selection of the identifier is in effect for this creation- Specified by:
forceIdentifierSelectionin interfaceDomainResultCreationState
-
registerVisitedAssociationKey
public boolean registerVisitedAssociationKey(AssociationKey associationKey)
Description copied from interface:DomainResultCreationStateRegisters a circularity detection key- Specified by:
registerVisitedAssociationKeyin interfaceDomainResultCreationState
-
isAssociationKeyVisited
public boolean isAssociationKeyVisited(AssociationKey associationKey)
Description copied from interface:DomainResultCreationStateChecks whether the given circularityKey is registered- Specified by:
isAssociationKeyVisitedin interfaceDomainResultCreationState
-
resolveModelPart
public ModelPart resolveModelPart(NavigablePath navigablePath)
Description copied from interface:DomainResultCreationStateResolve the ModelPart associated with a given NavigablePath. More specific ModelParts should be preferred - e.g. the SingularAssociationAttributeMapping rather than just the EntityTypeMapping for the associated type- Specified by:
resolveModelPartin interfaceDomainResultCreationState
-
getSqlExpressionResolver
public DomainResultCreationStateImpl getSqlExpressionResolver()
- Specified by:
getSqlExpressionResolverin interfaceSqlAstCreationState- Specified by:
getSqlExpressionResolverin interfaceSqlAstProcessingState
-
registerLockMode
public void registerLockMode(String identificationVariable, LockMode explicitLockMode)
- Specified by:
registerLockModein interfaceSqlAstCreationState
-
getCurrentProcessingState
public DomainResultCreationStateImpl getCurrentProcessingState()
- Specified by:
getCurrentProcessingStatein interfaceSqlAstCreationState
-
getCreationContext
public SqlAstCreationContext getCreationContext()
- Specified by:
getCreationContextin interfaceSqlAstCreationState
-
getSqlAliasBaseGenerator
public SqlAliasBaseGenerator getSqlAliasBaseGenerator()
- Specified by:
getSqlAliasBaseGeneratorin interfaceSqlAstCreationState
-
getLoadQueryInfluencers
public LoadQueryInfluencers getLoadQueryInfluencers()
- Specified by:
getLoadQueryInfluencersin interfaceSqlAstCreationState
-
applyOnlyLoadByKeyFilters
public boolean applyOnlyLoadByKeyFilters()
- Specified by:
applyOnlyLoadByKeyFiltersin interfaceSqlAstCreationState
-
getParentState
public SqlAstProcessingState 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
public <R> R withNestedFetchParent(FetchParent fetchParent, Function<FetchParent,R> action)
- Specified by:
withNestedFetchParentin interfaceDomainResultCreationState
-
visitIdentifierFetch
public Fetch visitIdentifierFetch(EntityResultGraphNode fetchParent)
- Specified by:
visitIdentifierFetchin interfaceDomainResultCreationState
-
visitFetches
public ImmutableFetchList visitFetches(FetchParent fetchParent)
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
public ForeignKeyDescriptor.Nature 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
-
-