Package org.hibernate.query.hql.internal
Class SqmPathRegistryImpl
java.lang.Object
org.hibernate.query.hql.internal.SqmPathRegistryImpl
- All Implemented Interfaces:
SqmPathRegistry
Container for indexing needed while building an SQM tree.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAliasedNodeByAlias
(String alias) Find a node (if one) by the explicit alias assigned to it within the select-clausefindAliasedNodeByPosition
(int position) Find an SqmSelection by its position in the SqmSelectClausefindAliasedNodePosition
(String alias) Find the position of a node with the given alias, relative to the underlying SQL select-list.<X extends SqmFrom<?,
?>>
XfindFromByAlias
(String alias, boolean searchParent) Find a SqmFrom by its identification variable (alias).<X extends SqmFrom<?,
?>>
XfindFromByPath
(NavigablePath navigablePath) Find a SqmFrom by its NavigablePath.<X extends SqmFrom<?,
?>>
XfindFromExposing
(String navigableName) Find a SqmFrom which exposes a Navigable by the given name.void
Register an SqmPathvoid
register
(SqmAliasedNode<?> node) Register a node aliased within the select-clausevoid
registerByAliasOnly
(SqmFrom<?, ?> sqmFrom) Register an SqmFrom by alias only.<E> void
replace
(SqmEntityJoin<?, E> sqmJoin, SqmRoot<E> sqmRoot) Used with JPA compliance to treat secondary query roots as cross-joins.<X extends SqmFrom<?,
?>>
XresolveFrom
(SqmPath<?> path) Similar toSqmPathRegistry.resolveFrom(org.hibernate.spi.NavigablePath, java.util.function.Function<org.hibernate.spi.NavigablePath, org.hibernate.query.sqm.tree.from.SqmFrom<?, ?>>)
, but accepting a SqmPath to be used to create and register a SqmFrom if none yet registered.<X extends SqmFrom<?,
?>>
XresolveFrom
(NavigablePath navigablePath, Function<NavigablePath, SqmFrom<?, ?>> creator) Similar toSqmPathRegistry.findFromByPath(org.hibernate.spi.NavigablePath)
, but accepting a producer to be used to create and register a SqmFrom if none yet registered.
-
Constructor Details
-
SqmPathRegistryImpl
-
-
Method Details
-
register
Description copied from interface:SqmPathRegistry
Register an SqmPath- Specified by:
register
in interfaceSqmPathRegistry
-
registerByAliasOnly
Description copied from interface:SqmPathRegistry
Register an SqmFrom by alias only. Effectively, this makes the from node only resolvable via the alias, which means that the from node is ignored inSqmPathRegistry.findFromExposing(String)
.- Specified by:
registerByAliasOnly
in interfaceSqmPathRegistry
-
replace
Description copied from interface:SqmPathRegistry
Used with JPA compliance to treat secondary query roots as cross-joins. Here we will replace thesqmRoot
with thesqmJoin
- Specified by:
replace
in interfaceSqmPathRegistry
-
findFromByAlias
Description copied from interface:SqmPathRegistry
Find a SqmFrom by its identification variable (alias). If the SqmFrom is found in a parent context, the correlation for the path will be returned.- Specified by:
findFromByAlias
in interfaceSqmPathRegistry
- Returns:
- matching SqmFrom or
null
-
findFromExposing
Description copied from interface:SqmPathRegistry
Find a SqmFrom which exposes a Navigable by the given name. Will search any parent contexts as well- Specified by:
findFromExposing
in interfaceSqmPathRegistry
- Returns:
- matching SqmFrom or
null
-
resolveFrom
Description copied from interface:SqmPathRegistry
Similar toSqmPathRegistry.resolveFrom(org.hibernate.spi.NavigablePath, java.util.function.Function<org.hibernate.spi.NavigablePath, org.hibernate.query.sqm.tree.from.SqmFrom<?, ?>>)
, but accepting a SqmPath to be used to create and register a SqmFrom if none yet registered.- Specified by:
resolveFrom
in interfaceSqmPathRegistry
- Returns:
- The existing or just-created SqmFrom
-
findAliasedNodeByAlias
Description copied from interface:SqmPathRegistry
Find a node (if one) by the explicit alias assigned to it within the select-clause- Specified by:
findAliasedNodeByAlias
in interfaceSqmPathRegistry
- Returns:
- The matching node, or null
-
findAliasedNodePosition
Description copied from interface:SqmPathRegistry
Find the position of a node with the given alias, relative to the underlying SQL select-list.- Specified by:
findAliasedNodePosition
in interfaceSqmPathRegistry
- Returns:
- The position, or null
-
findAliasedNodeByPosition
Description copied from interface:SqmPathRegistry
Find an SqmSelection by its position in the SqmSelectClause- Specified by:
findAliasedNodeByPosition
in interfaceSqmPathRegistry
- Returns:
- The matching node, or null
-
register
Description copied from interface:SqmPathRegistry
Register a node aliased within the select-clause- Specified by:
register
in interfaceSqmPathRegistry
-