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, 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
-
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 Detail
-
DomainResultCreationStateImpl
public DomainResultCreationStateImpl(String stateIdentifier, JdbcValuesMetadata jdbcResultsMetadata, Map<String,Map<String,DynamicFetchBuilderLegacy>> legacyFetchBuilders, Consumer<SqlSelection> sqlSelectionConsumer, LoadQueryInfluencers loadQueryInfluencers, 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:
getFromClauseAccess
in interfaceSqlAstCreationState
-
getSqlAstCreationState
public DomainResultCreationStateImpl getSqlAstCreationState()
Description copied from interface:DomainResultCreationState
The underlying state for SQL AST creation- Specified by:
getSqlAstCreationState
in interfaceDomainResultCreationState
- Specified by:
getSqlAstCreationState
in interfaceSqlAstProcessingState
-
getSqlAliasBaseManager
public SqlAliasBaseManager 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
public boolean registerVisitedAssociationKey(AssociationKey associationKey)
Description copied from interface:DomainResultCreationState
Registers a circularity detection key- Specified by:
registerVisitedAssociationKey
in interfaceDomainResultCreationState
-
isAssociationKeyVisited
public boolean isAssociationKeyVisited(AssociationKey associationKey)
Description copied from interface:DomainResultCreationState
Checks whether the given circularityKey is registered- Specified by:
isAssociationKeyVisited
in interfaceDomainResultCreationState
-
resolveModelPart
public ModelPart resolveModelPart(NavigablePath navigablePath)
Description copied from interface:DomainResultCreationState
Resolve 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:
resolveModelPart
in interfaceDomainResultCreationState
-
getSqlExpressionResolver
public DomainResultCreationStateImpl getSqlExpressionResolver()
- Specified by:
getSqlExpressionResolver
in interfaceSqlAstCreationState
- Specified by:
getSqlExpressionResolver
in interfaceSqlAstProcessingState
-
registerLockMode
public void registerLockMode(String identificationVariable, LockMode explicitLockMode)
- Specified by:
registerLockMode
in interfaceSqlAstCreationState
-
getCurrentProcessingState
public DomainResultCreationStateImpl getCurrentProcessingState()
- Specified by:
getCurrentProcessingState
in interfaceSqlAstCreationState
-
getCreationContext
public SqlAstCreationContext getCreationContext()
- Specified by:
getCreationContext
in interfaceSqlAstCreationState
-
getSqlAliasBaseGenerator
public SqlAliasBaseGenerator getSqlAliasBaseGenerator()
- Specified by:
getSqlAliasBaseGenerator
in interfaceSqlAstCreationState
-
getLoadQueryInfluencers
public LoadQueryInfluencers getLoadQueryInfluencers()
- Specified by:
getLoadQueryInfluencers
in interfaceSqlAstCreationState
-
getParentState
public SqlAstProcessingState 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
-
visitNestedFetches
public ImmutableFetchList visitNestedFetches(FetchParent fetchParent)
- Specified by:
visitNestedFetches
in interfaceDomainResultCreationState
-
visitIdentifierFetch
public Fetch visitIdentifierFetch(EntityResultGraphNode fetchParent)
- Specified by:
visitIdentifierFetch
in interfaceDomainResultCreationState
-
visitFetches
public ImmutableFetchList visitFetches(FetchParent fetchParent)
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
public ForeignKeyDescriptor.Nature 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
-
-