Top Description Methods
org.hibernate.query.hql.spi

public Interface SqmPathRegistry

Known Direct Implementers
org.hibernate.query.hql.internal.SqmPathRegistryImpl
Annotations
@Incubating
Imports
java.util.function.Function, org.hibernate.Incubating, org.hibernate.jpa.spi.JpaCompliance, org.hibernate.query.sqm.tree.from.SqmEntityJoin, .SqmJoin, .SqmRoot, .SqmFrom, org.hibernate.spi.NavigablePath, org.hibernate.query.sqm.tree.domain.SqmPath, org.hibernate.query.sqm.tree.select.SqmAliasedNode

Registry for SqmPath references providing the ability to access them in multiple ways - by alias, by NavigablePath, etc
Authors
Andrea Boriero, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public SqmAliasedNode<?>

Returns:

The matching node, or null
findAliasedNodeByAlias
(String alias)

Find a node (if one) by the explicit alias assigned to it within the select-clause

public SqmAliasedNode<?>

Returns:

The matching node, or null
findAliasedNodeByPosition
(int position)

Find an SqmSelection by its position in the SqmSelectClause

public Integer

Returns:

The position, or null
findAliasedNodePosition
(String alias)

Find the position of a node with the given alias, relative to the underlying SQL select-list.

public <X extends SqmFrom<?, ?>> X

Returns:

matching SqmFrom or null
findFromByAlias
(String identificationVariable, boolean searchParent)

Find a SqmFrom by its identification variable (alias).

public <X extends SqmFrom<?, ?>> X

Returns:

matching SqmFrom or null
findFromByPath
(NavigablePath navigablePath)

Find a SqmFrom by its NavigablePath.

public <X extends SqmFrom<?, ?>> X

Returns:

matching SqmFrom or null
findFromExposing
(String navigableName)

Find a SqmFrom which exposes a Navigable by the given name.

public void
register(SqmPath<?> sqmPath)

Register an SqmPath

public void
register(SqmAliasedNode<?> aliasedNode)

Register a node aliased within the select-clause

public <E> void
replace(SqmEntityJoin<E> sqmJoin, SqmRoot<E> sqmRoot)

Used with JPA compliance to treat secondary query roots as cross-joins.

public <X extends SqmFrom<?, ?>> X

Returns:

The existing or just-created SqmFrom
resolveFrom
(NavigablePath path, Function<NavigablePath, SqmFrom<?, ?>> creator)

Similar to findFromByPath, but accepting a producer to be used to create and register a SqmFrom if none yet registered.

public <X extends SqmFrom<?, ?>> X

Returns:

The existing or just-created SqmFrom
resolveFrom
(SqmPath<?> path)

Similar to resolveFrom, but accepting a SqmPath to be used to create and register a SqmFrom if none yet registered.

Method Detail

findAliasedNodeByAliasback to summary
public SqmAliasedNode<?> findAliasedNodeByAlias(String alias)

Find a node (if one) by the explicit alias assigned to it within the select-clause

Returns:SqmAliasedNode<?>

The matching node, or null

findAliasedNodeByPositionback to summary
public SqmAliasedNode<?> findAliasedNodeByPosition(int position)

Find an SqmSelection by its position in the SqmSelectClause

Returns:SqmAliasedNode<?>

The matching node, or null

findAliasedNodePositionback to summary
public Integer findAliasedNodePosition(String alias)

Find the position of a node with the given alias, relative to the underlying SQL select-list.

Returns:Integer

The position, or null

findFromByAliasback to summary
public <X extends SqmFrom<?, ?>> X findFromByAlias(String identificationVariable, boolean searchParent)

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.

Returns:X

matching SqmFrom or null

findFromByPathback to summary
public <X extends SqmFrom<?, ?>> X findFromByPath(NavigablePath navigablePath)

Find a SqmFrom by its NavigablePath. Will search any parent contexts as well

Returns:X

matching SqmFrom or null

findFromExposingback to summary
public <X extends SqmFrom<?, ?>> X findFromExposing(String navigableName)

Find a SqmFrom which exposes a Navigable by the given name. Will search any parent contexts as well

Returns:X

matching SqmFrom or null

registerback to summary
public void register(SqmPath<?> sqmPath)

Register an SqmPath

registerback to summary
public void register(SqmAliasedNode<?> aliasedNode)

Register a node aliased within the select-clause

replaceback to summary
public <E> void replace(SqmEntityJoin<E> sqmJoin, SqmRoot<E> sqmRoot)

Used with JPA compliance to treat secondary query roots as cross-joins. Here we will replace the sqmRoot with the sqmJoin

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.

resolveFromback to summary
public <X extends SqmFrom<?, ?>> X resolveFrom(NavigablePath path, Function<NavigablePath, SqmFrom<?, ?>> creator)

Similar to findFromByPath, but accepting a producer to be used to create and register a SqmFrom if none yet registered.

Returns:X

The existing or just-created SqmFrom

resolveFromback to summary
public <X extends SqmFrom<?, ?>> X resolveFrom(SqmPath<?> path)

Similar to resolveFrom, but accepting a SqmPath to be used to create and register a SqmFrom if none yet registered.

Returns:X

The existing or just-created SqmFrom