Package org.hibernate.query.hql.internal
Class SqmPathRegistryImpl
- java.lang.Object
-
- org.hibernate.query.hql.internal.SqmPathRegistryImpl
-
- All Implemented Interfaces:
SqmPathRegistry
public class SqmPathRegistryImpl extends Object implements SqmPathRegistry
Container for indexing needed while building an SQM tree.
-
-
Constructor Summary
Constructors Constructor Description SqmPathRegistryImpl(SqmCreationProcessingState associatedProcessingState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqmAliasedNode<?>
findAliasedNodeByAlias(String alias)
Find a node (if one) by the explicit alias assigned to it within the select-clauseSqmAliasedNode<?>
findAliasedNodeByPosition(int position)
Find an SqmSelection by its position in the SqmSelectClauseInteger
findAliasedNodePosition(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(SqmPath<?> sqmPath)
Register an SqmPathvoid
register(SqmAliasedNode<?> node)
Register a node aliased within the select-clause<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 Detail
-
SqmPathRegistryImpl
public SqmPathRegistryImpl(SqmCreationProcessingState associatedProcessingState)
-
-
Method Detail
-
register
public void register(SqmPath<?> sqmPath)
Description copied from interface:SqmPathRegistry
Register an SqmPath- Specified by:
register
in interfaceSqmPathRegistry
-
findFromByPath
public <X extends SqmFrom<?,?>> X findFromByPath(NavigablePath navigablePath)
Description copied from interface:SqmPathRegistry
Find a SqmFrom by its NavigablePath. Will search any parent contexts as well- Specified by:
findFromByPath
in interfaceSqmPathRegistry
- Returns:
- matching SqmFrom or
null
-
findFromByAlias
public <X extends SqmFrom<?,?>> X findFromByAlias(String alias, boolean searchParent)
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
public <X extends SqmFrom<?,?>> X findFromExposing(String navigableName)
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
public <X extends SqmFrom<?,?>> X resolveFrom(NavigablePath navigablePath, Function<NavigablePath,SqmFrom<?,?>> creator)
Description copied from interface:SqmPathRegistry
Similar toSqmPathRegistry.findFromByPath(org.hibernate.spi.NavigablePath)
, but accepting a producer 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
-
resolveFrom
public <X extends SqmFrom<?,?>> X resolveFrom(SqmPath<?> path)
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
public SqmAliasedNode<?> findAliasedNodeByAlias(String alias)
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
public Integer findAliasedNodePosition(String alias)
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
public SqmAliasedNode<?> findAliasedNodeByPosition(int position)
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
public void register(SqmAliasedNode<?> node)
Description copied from interface:SqmPathRegistry
Register a node aliased within the select-clause- Specified by:
register
in interfaceSqmPathRegistry
-
-