Class LoaderSqlAstCreationState
- java.lang.Object
-
- org.hibernate.loader.ast.internal.LoaderSqlAstCreationState
-
- All Implemented Interfaces:
QueryOptions,SqlAstCreationState,SqlAstProcessingState,DomainResultCreationState
public class LoaderSqlAstCreationState extends Object implements SqlAstProcessingState, SqlAstCreationState, DomainResultCreationState, QueryOptions
Helper used when generating the database-snapshot select query
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLoaderSqlAstCreationState.FetchProcessor
-
Field Summary
-
Fields inherited from interface org.hibernate.query.spi.QueryOptions
NONE
-
-
Constructor Summary
Constructors Constructor Description LoaderSqlAstCreationState(QueryPart queryPart, SqlAliasBaseManager sqlAliasBaseManager, FromClauseAccess fromClauseAccess, LockOptions lockOptions, LoaderSqlAstCreationState.FetchProcessor fetchProcessor, boolean forceIdentifierSelection, SqlAstCreationContext sf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanforceIdentifierSelection()Whether forcing the selection of the identifier is in effect for this creationAppliedGraphgetAppliedGraph()JPAEntityGraphexplicitly applied to the query.jakarta.persistence.CacheRetrieveModegetCacheRetrieveMode()Controls whether query results are read from the cache.jakarta.persistence.CacheStoreModegetCacheStoreMode()Controls whether query results are put into the cache.StringgetComment()The SQL comment to apply to the interpreted SQL query, for dialects which support SQL commentsSqlAstCreationContextgetCreationContext()ForeignKeyDescriptor.NaturegetCurrentlyResolvingForeignKeyPart()Returns the part of the foreign key that is currently being resolved, ornullif no foreign key is currently being resolved.SqlAstProcessingStategetCurrentProcessingState()List<String>getDatabaseHints()Hints to apply to the interpreted SQL queryIntegergetFetchSize()The fetch size to be applied to the JDBC query.FlushModegetFlushMode()The flush mode to use for the query executionFromClauseAccessgetFromClauseAccess()LimitgetLimit()The limit to the query results.LockOptionsgetLockOptions()Describes the locking to apply to the query resultsSqlAstProcessingStategetParentState()StringgetResultCacheRegionName()The query cache region in which the results should be cached.ResultListTransformergetResultListTransformer()Transformer applied to the query to transform the structure of the overall resultsSqlAliasBaseGeneratorgetSqlAliasBaseGenerator()SqlAstCreationStategetSqlAstCreationState()The underlying state for SQL AST creationSqlExpressionResolvergetSqlExpressionResolver()IntegergetTimeout()The timeout to apply to the query.TupleTransformergetTupleTransformer()Transformer applied to the query to transform the structure of each "row" in the resultsbooleanisAssociationKeyVisited(AssociationKey associationKey)Checks whether the given circularityKey is registeredBooleanisReadOnly()Should entities returned from the query be marked read-only.booleanisRegisteringVisitedAssociationKeys()Is this state accepting circularity detection keys?booleanisResolvingCircularFetch()BooleanisResultCachingEnabled()Should results from the query be cached?voidregisterLockMode(String identificationVariable, LockMode explicitLockMode)booleanregisterVisitedAssociationKey(AssociationKey associationKey)Registers a circularity detection keyvoidremoveVisitedAssociationKey(AssociationKey associationKey)Removes the registration of a circularity detection keyModelPartresolveModelPart(NavigablePath navigablePath)Resolve the ModelPart associated with a given NavigablePath.voidsetCurrentlyResolvingForeignKeyPart(ForeignKeyDescriptor.Nature currentlyResolvingForeignKeySide)voidsetResolvingCircularFetch(boolean resolvingCircularFetch)List<Fetch>visitFetches(FetchParent fetchParent)Visit fetches for the given parent.-
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
getSqlAliasBaseManager
-
Methods inherited from interface org.hibernate.query.spi.QueryOptions
getCacheMode, getEffectiveLimit, getFirstRow, getMaxRows, getUniqueSemantic, hasLimit
-
-
-
-
Constructor Detail
-
LoaderSqlAstCreationState
public LoaderSqlAstCreationState(QueryPart queryPart, SqlAliasBaseManager sqlAliasBaseManager, FromClauseAccess fromClauseAccess, LockOptions lockOptions, LoaderSqlAstCreationState.FetchProcessor fetchProcessor, boolean forceIdentifierSelection, SqlAstCreationContext sf)
-
-
Method Detail
-
getCreationContext
public SqlAstCreationContext getCreationContext()
- Specified by:
getCreationContextin interfaceSqlAstCreationState
-
getCurrentProcessingState
public SqlAstProcessingState getCurrentProcessingState()
- Specified by:
getCurrentProcessingStatein interfaceSqlAstCreationState
-
getSqlExpressionResolver
public SqlExpressionResolver getSqlExpressionResolver()
- Specified by:
getSqlExpressionResolverin interfaceSqlAstCreationState- Specified by:
getSqlExpressionResolverin interfaceSqlAstProcessingState
-
getFromClauseAccess
public FromClauseAccess getFromClauseAccess()
- Specified by:
getFromClauseAccessin interfaceSqlAstCreationState
-
getSqlAliasBaseGenerator
public SqlAliasBaseGenerator getSqlAliasBaseGenerator()
- Specified by:
getSqlAliasBaseGeneratorin interfaceSqlAstCreationState
-
registerLockMode
public void registerLockMode(String identificationVariable, LockMode explicitLockMode)
- Specified by:
registerLockModein interfaceSqlAstCreationState
-
visitFetches
public List<Fetch> 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
-
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
-
getSqlAstCreationState
public SqlAstCreationState getSqlAstCreationState()
Description copied from interface:DomainResultCreationStateThe underlying state for SQL AST creation- Specified by:
getSqlAstCreationStatein interfaceDomainResultCreationState- Specified by:
getSqlAstCreationStatein interfaceSqlAstProcessingState
-
registerVisitedAssociationKey
public boolean registerVisitedAssociationKey(AssociationKey associationKey)
Description copied from interface:DomainResultCreationStateRegisters a circularity detection key- Specified by:
registerVisitedAssociationKeyin interfaceDomainResultCreationState
-
removeVisitedAssociationKey
public void removeVisitedAssociationKey(AssociationKey associationKey)
Description copied from interface:DomainResultCreationStateRemoves the registration of a circularity detection key- Specified by:
removeVisitedAssociationKeyin interfaceDomainResultCreationState
-
isAssociationKeyVisited
public boolean isAssociationKeyVisited(AssociationKey associationKey)
Description copied from interface:DomainResultCreationStateChecks whether the given circularityKey is registered- Specified by:
isAssociationKeyVisitedin interfaceDomainResultCreationState
-
isRegisteringVisitedAssociationKeys
public boolean isRegisteringVisitedAssociationKeys()
Description copied from interface:DomainResultCreationStateIs this state accepting circularity detection keys?- Specified by:
isRegisteringVisitedAssociationKeysin 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
-
getParentState
public SqlAstProcessingState getParentState()
- Specified by:
getParentStatein interfaceSqlAstProcessingState
-
getTimeout
public Integer getTimeout()
Description copied from interface:QueryOptionsThe timeout to apply to the query. May also be defined at the transaction level usingTransaction.getTimeout()- Specified by:
getTimeoutin interfaceQueryOptions
-
getFlushMode
public FlushMode getFlushMode()
Description copied from interface:QueryOptionsThe flush mode to use for the query execution- Specified by:
getFlushModein interfaceQueryOptions
-
isReadOnly
public Boolean isReadOnly()
Description copied from interface:QueryOptionsShould entities returned from the query be marked read-only.- Specified by:
isReadOnlyin interfaceQueryOptions
-
getAppliedGraph
public AppliedGraph getAppliedGraph()
Description copied from interface:QueryOptionsJPAEntityGraphexplicitly applied to the query.- Specified by:
getAppliedGraphin interfaceQueryOptions
-
getTupleTransformer
public TupleTransformer getTupleTransformer()
Description copied from interface:QueryOptionsTransformer applied to the query to transform the structure of each "row" in the results- Specified by:
getTupleTransformerin interfaceQueryOptions
-
getResultListTransformer
public ResultListTransformer getResultListTransformer()
Description copied from interface:QueryOptionsTransformer applied to the query to transform the structure of the overall results- Specified by:
getResultListTransformerin interfaceQueryOptions
-
isResultCachingEnabled
public Boolean isResultCachingEnabled()
Description copied from interface:QueryOptionsShould results from the query be cached?- Specified by:
isResultCachingEnabledin interfaceQueryOptions- See Also:
QueryOptions.getCacheMode(),QueryOptions.getResultCacheRegionName()
-
getCacheRetrieveMode
public jakarta.persistence.CacheRetrieveMode getCacheRetrieveMode()
Description copied from interface:QueryOptionsControls whether query results are read from the cache. No effect unlessQueryOptions.isResultCachingEnabled()returnstrue- Specified by:
getCacheRetrieveModein interfaceQueryOptions- See Also:
CacheMode
-
getCacheStoreMode
public jakarta.persistence.CacheStoreMode getCacheStoreMode()
Description copied from interface:QueryOptionsControls whether query results are put into the cache. No effect unlessQueryOptions.isResultCachingEnabled()returnstrue- Specified by:
getCacheStoreModein interfaceQueryOptions- See Also:
CacheMode
-
getResultCacheRegionName
public String getResultCacheRegionName()
Description copied from interface:QueryOptionsThe query cache region in which the results should be cached. No effect unlessQueryOptions.isResultCachingEnabled()returnstrue- Specified by:
getResultCacheRegionNamein interfaceQueryOptions
-
getLockOptions
public LockOptions getLockOptions()
Description copied from interface:QueryOptionsDescribes the locking to apply to the query results- Specified by:
getLockOptionsin interfaceQueryOptions
-
getComment
public String getComment()
Description copied from interface:QueryOptionsThe SQL comment to apply to the interpreted SQL query, for dialects which support SQL comments- Specified by:
getCommentin interfaceQueryOptions
-
getDatabaseHints
public List<String> getDatabaseHints()
Description copied from interface:QueryOptionsHints to apply to the interpreted SQL query- Specified by:
getDatabaseHintsin interfaceQueryOptions
-
getFetchSize
public Integer getFetchSize()
Description copied from interface:QueryOptionsThe fetch size to be applied to the JDBC query.- Specified by:
getFetchSizein interfaceQueryOptions- See Also:
Statement.getFetchSize()
-
getLimit
public Limit getLimit()
Description copied from interface:QueryOptionsThe limit to the query results. May also be accessed viaQueryOptions.getFirstRow()andQueryOptions.getMaxRows()- Specified by:
getLimitin interfaceQueryOptions
-
-