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(From<?, ?> root) |
JpaQueryContext(java.util.List<HibernateAlias> aliases, From<?, ?> root) |
JpaQueryContext(JpaQueryContext parent, From<?, ?> root) |
JpaQueryContext(JpaQueryContext parent, java.util.List<HibernateAlias> aliases, From<?, ?> root)Internal constructor for subqueries and base initialization. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addFrom(java.lang.String path, From<?, ?> from) |
|
public void |
bindParameter(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(From<?, ?> root) |
|
public static JpaQueryContext |
forRoot(java.util.List<HibernateAlias> aliases, From<?, ?> root) |
|
public static JpaQueryContext |
forSubquery(JpaQueryContext parent, From<?, ?> root) |
|
public static JpaQueryContext |
forSubquery(JpaQueryContext parent, java.util.List<HibernateAlias> aliases, From<?, ?> root) |
|
protected AliasRegistry |
getAliasRegistry() |
|
public Expression<?> |
getAliasedExpression(java.lang.String alias) |
|
public From<?, ?> |
getFrom(java.lang.String path) |
|
public Expression<?> |
getFullyQualifiedExpression(java.lang.String path) |
|
public Path<?> |
getFullyQualifiedPath(java.lang.String path) |
|
protected JoinTracker |
getJoinTracker() |
|
public java.util.Map<ParameterExpression<?>, java.lang.Object> |
getParameterValues()Returns the values of the criteria parameters recorded for the query, in the order they were recorded. |
|
public From<?, ?> |
getRoot() |
|
public boolean |
hasAlias(java.lang.String alias) |
|
public void |
registerAlias(java.lang.String alias, Expression<?> expression) |
|
public void |
registerAlias(java.lang.String alias, HibernateAlias definition) |
|
public void |
registerAliasFromPath(java.lang.String path) |
|
public void |
setParent(JpaQueryContext parent) |
|
public void |
setRoot(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.