Package org.apache.openjpa.kernel.exps
Class Context
- java.lang.Object
-
- org.apache.openjpa.kernel.exps.Context
-
- All Implemented Interfaces:
java.io.Serializable
public class Context extends java.lang.Object implements java.io.Serializable
JPQL / Criteria Query Context- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
aliasCount
Context
cloneFrom
Expression
from
ClassMetaData
meta
JPQLExpressionBuilder.ParsedJPQL
parsed
java.lang.String
schemaAlias
Subquery
subquery
-
Constructor Summary
Constructors Constructor Description Context(JPQLExpressionBuilder.ParsedJPQL parsed, Subquery subquery, Context parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSchema(java.lang.String id, ClassMetaData meta)
void
addSubselContext(Context sub)
Register the subquery context in this context.void
addVariable(java.lang.String id, Value var)
Context
findContext(java.lang.String alias)
Given an alias find the context of its associated variable where it is defined.Value
findVariable(java.lang.String alias)
Given an alias find the variable in JPQL contexts.Context
getParent()
ClassMetaData
getSchema(java.lang.String id)
java.util.Map<java.lang.String,ClassMetaData>
getSchemas()
java.lang.Object
getSelect()
Returns the select associated with this context.Subquery
getSubquery()
Returns the subquery in this context.java.util.List<Context>
getSubselContexts()
Returns the subquery context.Value
getVariable(java.lang.String alias)
Given an alias and return its associated variable.java.util.Map<java.lang.String,Value>
getVariables()
ClassMetaData
meta()
int
nextAlias()
Returns next table alias to be created.void
resetAliasCount()
Reset alias count for prepared query cachejava.lang.String
schemaAlias()
void
setSchemas(java.util.Map<java.lang.String,ClassMetaData> schemas)
void
setSelect(java.lang.Object select)
Register the select for this context.void
setSubquery(Subquery subquery)
void
setVariables(java.util.Map<java.lang.String,Value> variables)
Subquery
subquery()
-
-
-
Field Detail
-
parsed
public final JPQLExpressionBuilder.ParsedJPQL parsed
-
meta
public ClassMetaData meta
-
schemaAlias
public java.lang.String schemaAlias
-
subquery
public Subquery subquery
-
from
public Expression from
-
cloneFrom
public Context cloneFrom
-
aliasCount
protected int aliasCount
-
-
Constructor Detail
-
Context
public Context(JPQLExpressionBuilder.ParsedJPQL parsed, Subquery subquery, Context parent)
-
-
Method Detail
-
setSubquery
public void setSubquery(Subquery subquery)
-
meta
public ClassMetaData meta()
-
schemaAlias
public java.lang.String schemaAlias()
-
subquery
public Subquery subquery()
-
nextAlias
public int nextAlias()
Returns next table alias to be created.
-
resetAliasCount
public void resetAliasCount()
Reset alias count for prepared query cache
-
setSelect
public void setSelect(java.lang.Object select)
Register the select for this context.
-
getSelect
public java.lang.Object getSelect()
Returns the select associated with this context.
-
addSubselContext
public void addSubselContext(Context sub)
Register the subquery context in this context.
-
getSubselContexts
public java.util.List<Context> getSubselContexts()
Returns the subquery context.
-
getSubquery
public Subquery getSubquery()
Returns the subquery in this context.
-
getParent
public Context getParent()
-
addVariable
public void addVariable(java.lang.String id, Value var)
-
getVariables
public java.util.Map<java.lang.String,Value> getVariables()
-
setVariables
public void setVariables(java.util.Map<java.lang.String,Value> variables)
-
addSchema
public void addSchema(java.lang.String id, ClassMetaData meta)
-
getSchema
public ClassMetaData getSchema(java.lang.String id)
-
getSchemas
public java.util.Map<java.lang.String,ClassMetaData> getSchemas()
-
setSchemas
public void setSchemas(java.util.Map<java.lang.String,ClassMetaData> schemas)
-
getVariable
public Value getVariable(java.lang.String alias)
Given an alias and return its associated variable.
-
findContext
public Context findContext(java.lang.String alias)
Given an alias find the context of its associated variable where it is defined.
-
findVariable
public Value findVariable(java.lang.String alias)
Given an alias find the variable in JPQL contexts.
-
-