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.voidRegister an SqmPathvoidregister(SqmAliasedNode<?> node) Register a node aliased within the select-clausevoidregisterByAliasOnly(SqmFrom<?, ?> sqmFrom) Register an SqmFrom by alias only.<E> voidreplace(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:SqmPathRegistryRegister an SqmPath- Specified by:
registerin interfaceSqmPathRegistry
-
registerByAliasOnly
Description copied from interface:SqmPathRegistryRegister 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:
registerByAliasOnlyin interfaceSqmPathRegistry
-
replace
Description copied from interface:SqmPathRegistryUsed with JPA compliance to treat secondary query roots as cross-joins. Here we will replace thesqmRootwith thesqmJoin- Specified by:
replacein interfaceSqmPathRegistry
-
findFromByAlias
Description copied from interface:SqmPathRegistryFind 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:
findFromByAliasin interfaceSqmPathRegistry- Returns:
- matching SqmFrom or
null
-
findFromExposing
Description copied from interface:SqmPathRegistryFind a SqmFrom which exposes a Navigable by the given name. Will search any parent contexts as well- Specified by:
findFromExposingin interfaceSqmPathRegistry- Returns:
- matching SqmFrom or
null
-
resolveFrom
Description copied from interface:SqmPathRegistrySimilar 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:
resolveFromin interfaceSqmPathRegistry- Returns:
- The existing or just-created SqmFrom
-
findAliasedNodeByAlias
Description copied from interface:SqmPathRegistryFind a node (if one) by the explicit alias assigned to it within the select-clause- Specified by:
findAliasedNodeByAliasin interfaceSqmPathRegistry- Returns:
- The matching node, or null
-
findAliasedNodePosition
Description copied from interface:SqmPathRegistryFind the position of a node with the given alias, relative to the underlying SQL select-list.- Specified by:
findAliasedNodePositionin interfaceSqmPathRegistry- Returns:
- The position, or null
-
findAliasedNodeByPosition
Description copied from interface:SqmPathRegistryFind an SqmSelection by its position in the SqmSelectClause- Specified by:
findAliasedNodeByPositionin interfaceSqmPathRegistry- Returns:
- The matching node, or null
-
register
Description copied from interface:SqmPathRegistryRegister a node aliased within the select-clause- Specified by:
registerin interfaceSqmPathRegistry
-