public class JpaQueryContext extends java.lang.Object implements java.lang.Cloneable
Orchestrator for JPA query translation state (Aliases, Joins, Expressions). ExpressionResolver receives the shared AliasRegistry and JoinTracker so aliases and joins remain scoped to the current root or subquery context.
| Constructor and description |
|---|
JpaQueryContext() |
JpaQueryContext(jakarta.persistence.criteria.From<?, ?> root) |
JpaQueryContext(java.util.List<HibernateAlias> aliases, jakarta.persistence.criteria.From<?, ?> root) |
JpaQueryContext(JpaQueryContext parent, jakarta.persistence.criteria.From<?, ?> root) |
JpaQueryContext(JpaQueryContext parent, java.util.List<HibernateAlias> aliases, jakarta.persistence.criteria.From<?, ?> root)Internal constructor for subqueries and base initialization. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addFrom(java.lang.String path, jakarta.persistence.criteria.From<?, ?> from) |
|
public void |
bindParameter(jakarta.persistence.criteria.ParameterExpression<?> parameter, java.lang.Object value)Records the value of a criteria parameter, to be bound once the query is created. |
|
public JpaQueryContext |
clone() |
|
public static JpaQueryContext |
forRoot(jakarta.persistence.criteria.From<?, ?> root) |
|
public static JpaQueryContext |
forRoot(java.util.List<HibernateAlias> aliases, jakarta.persistence.criteria.From<?, ?> root) |
|
public static JpaQueryContext |
forSubquery(JpaQueryContext parent, jakarta.persistence.criteria.From<?, ?> root) |
|
public static JpaQueryContext |
forSubquery(JpaQueryContext parent, java.util.List<HibernateAlias> aliases, jakarta.persistence.criteria.From<?, ?> root) |
|
protected AliasRegistry |
getAliasRegistry() |
|
public jakarta.persistence.criteria.Expression<?> |
getAliasedExpression(java.lang.String alias) |
|
public jakarta.persistence.criteria.From<?, ?> |
getFrom(java.lang.String path) |
|
public jakarta.persistence.criteria.Expression<?> |
getFullyQualifiedExpression(java.lang.String path) |
|
public jakarta.persistence.criteria.Path<?> |
getFullyQualifiedPath(java.lang.String path) |
|
protected JoinTracker |
getJoinTracker() |
|
public java.util.Map<jakarta.persistence.criteria.ParameterExpression<?>, java.lang.Object> |
getParameterValues()Returns the values of the criteria parameters recorded for the query, in the order they were recorded. |
|
public jakarta.persistence.criteria.From<?, ?> |
getRoot() |
|
public jakarta.persistence.criteria.Expression<?> |
getSelectionAlias(java.lang.String alias)Returns the selection recorded under an alias by registerSelectionAlias(String, Expression). |
|
public boolean |
hasAlias(java.lang.String alias) |
|
public void |
registerAlias(java.lang.String alias, jakarta.persistence.criteria.Expression<?> expression) |
|
public void |
registerAlias(java.lang.String alias, HibernateAlias definition) |
|
public void |
registerAliasFromPath(java.lang.String path) |
|
public void |
registerSelectionAlias(java.lang.String alias, jakarta.persistence.criteria.Expression<?> selection)Records a selection of the query under its alias, by which an order of the query refers to it. |
|
public void |
setParent(JpaQueryContext parent) |
|
public void |
setRoot(jakarta.persistence.criteria.From<?, ?> root) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Internal constructor for subqueries and base initialization.
Records the value of a criteria parameter, to be bound once the query is created. A subquery context records it in the context of the query that contains the subquery.
parameter - the parameter used in the criteria queryvalue - the value to bind to the parameterReturns the values of the criteria parameters recorded for the query, in the order they were recorded.
Returns the selection recorded under an alias by registerSelectionAlias(String, Expression).
alias - the alias of the selectionnull if no selection of this query has the aliasRecords a selection of the query under its alias, by which an order of the query refers to it. Unlike registerAlias(String, Expression), the alias does not resolve a property path, in this context or a nested one, so a restriction on a property with the same name still restricts the property.
alias - the alias of the selectionselection - the selection