Interface SqmPathRegistry
Registry for SqmPath references providing the ability to access them
in multiple ways - by alias, by NavigablePath, etc
-
Method Summary
Modifier and TypeMethodDescription@Nullable SqmAliasedNode<?> findAliasedNodeByAlias(String alias) Find a node (if one) by the explicit alias assigned to it within the select-clause@Nullable SqmAliasedNode<?> findAliasedNodeByPosition(int position) Find an SqmSelection by its position in the SqmSelectClause@Nullable IntegerfindAliasedNodePosition(String alias) Find the position of a node with the given alias, relative to the underlying SQL select-list.<X extends SqmFrom<?,?>>
@Nullable XfindFromByAlias(String identificationVariable, boolean searchParent) Find a SqmFrom by its identification variable (alias).<X extends SqmFrom<?,?>>
@Nullable XfindFromByPath(NavigablePath navigablePath) Find a SqmFrom by its NavigablePath.<X extends SqmFrom<?,?>>
@Nullable XfindFromExposing(String navigableName) Find a SqmFrom which exposes a Navigable by the given name.voidRegister an SqmPathvoidregister(SqmAliasedNode<?> aliasedNode) 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 toresolveFrom(NavigablePath, Function), but accepting a SqmPath to be used to create and register a SqmFrom if none yet registered.<X extends SqmFrom<?,?>>
XresolveFrom(NavigablePath path, Function<NavigablePath, SqmFrom<?, ?>> creator) Similar tofindFromByPath(NavigablePath), but accepting a producer to be used to create and register a SqmFrom if none yet registered.<X extends SqmFrom<?,?>>
XresolveFromByPath(NavigablePath navigablePath) Find a SqmFrom by its NavigablePath.
-
Method Details
-
register
Register an SqmPath -
registerByAliasOnly
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 infindFromExposing(String). -
replace
Used with JPA compliance to treat secondary query roots as cross-joins. Here we will replace thesqmRootwith thesqmJoin- API Note:
- Care should be taken when calling this method to ensure that nothing
has used the previous registration between its registration and this call.
Generally, most callers want
register(SqmPath)instead.
-
findFromByAlias
-
findFromExposing
-
resolveFrom
Similar toresolveFrom(NavigablePath, Function), but accepting a SqmPath to be used to create and register a SqmFrom if none yet registered.- Returns:
- The existing or just-created SqmFrom
-
register
Register a node aliased within the select-clause -
findAliasedNodeByAlias
Find a node (if one) by the explicit alias assigned to it within the select-clause- Returns:
- The matching node, or null
-
findAliasedNodePosition
-
findAliasedNodeByPosition
Find an SqmSelection by its position in the SqmSelectClause- Returns:
- The matching node, or null
-