|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.query.compiler.QueryCompilation
public class QueryCompilation
Representation of the components of a compiled java "string-based" query. Assumes that the query has the following forms
SELECT {result} FROM {from} WHERE {filter} GROUP BY {grouping} HAVING {having} ORDER BY {order}
UPDATE {from} SET {update} WHERE {filter}
DELETE FROM {from} WHERE {filter}
| Field Summary | |
|---|---|
protected java.lang.String |
candidateAlias
Alias for the (primary) candidate. |
protected java.lang.Class |
candidateClass
Primary candidate class. |
protected Expression |
exprFilter
Compiled filter expression |
protected Expression[] |
exprFrom
Compiled from expression. |
protected Expression[] |
exprGrouping
Compiled grouping expression. |
protected Expression |
exprHaving
Compiled having expression. |
protected Expression[] |
exprOrdering
Compiled ordering expression. |
protected Expression[] |
exprResult
Compiled result expression. |
protected Expression[] |
exprUpdate
Compiled update expression. |
protected static Localiser |
LOCALISER
Localiser for messages. |
protected java.lang.String |
queryLanguage
Query language that this is a compilation for. |
protected boolean |
returnsSingleRow
Whether the query will return a single row. |
protected java.util.Map<java.lang.String,QueryCompilation> |
subqueryCompilations
Compilations of any subqueries, keyed by the subquery variable name. |
protected SymbolTable |
symtbl
Compiled Symbol Table. |
| Constructor Summary | |
|---|---|
QueryCompilation(java.lang.Class candidateCls,
java.lang.String candidateAlias,
SymbolTable symtbl,
Expression[] results,
Expression[] froms,
Expression filter,
Expression[] groupings,
Expression having,
Expression[] orderings,
Expression[] updates)
|
|
| Method Summary | |
|---|---|
void |
addSubqueryCompilation(java.lang.String alias,
QueryCompilation compilation)
Method to add the compilation for a subquery of this query. |
java.lang.String |
debugString(java.lang.String indent)
|
java.lang.String |
getCandidateAlias()
Accessor for the candidate alias. |
java.lang.Class |
getCandidateClass()
Accessor for the candidate class. |
QueryCompilation |
getCompilationForSubquery(java.lang.String alias)
Accessor for the compilation for a subquery with the specified alias. |
Expression |
getExprFilter()
Accessor for the filter expression. |
Expression[] |
getExprFrom()
Accessor for any from expression(s). |
Expression[] |
getExprGrouping()
Accessor for any grouping expression(s). |
Expression |
getExprHaving()
Accessor for any having expression. |
Expression[] |
getExprOrdering()
Accessor for any ordering expression(s). |
Expression[] |
getExprResult()
Accessor for any result expression(s). |
Expression[] |
getExprUpdate()
Accessor for any update expression(s). |
ParameterExpression |
getParameterExpressionForPosition(int pos)
|
java.lang.String |
getQueryLanguage()
|
java.lang.Class[] |
getResultTypes()
Accessor for the types of the result row components. |
java.lang.String[] |
getSubqueryAliases()
Accessor for the aliases for any subqueries in this compilation. |
SymbolTable |
getSymbolTable()
Accessor for the symbol table for the query. |
boolean |
returnsSingleRow()
Accessor for whether this query will return a single row. |
void |
setQueryLanguage(java.lang.String lang)
|
void |
setReturnsSingleRow()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
protected java.lang.String queryLanguage
protected java.lang.Class candidateClass
protected java.lang.String candidateAlias
protected boolean returnsSingleRow
protected SymbolTable symtbl
protected Expression[] exprResult
protected Expression[] exprFrom
protected Expression[] exprUpdate
protected Expression exprFilter
protected Expression[] exprGrouping
protected Expression exprHaving
protected Expression[] exprOrdering
protected java.util.Map<java.lang.String,QueryCompilation> subqueryCompilations
| Constructor Detail |
|---|
public QueryCompilation(java.lang.Class candidateCls,
java.lang.String candidateAlias,
SymbolTable symtbl,
Expression[] results,
Expression[] froms,
Expression filter,
Expression[] groupings,
Expression having,
Expression[] orderings,
Expression[] updates)
| Method Detail |
|---|
public void setQueryLanguage(java.lang.String lang)
public java.lang.String getQueryLanguage()
public void setReturnsSingleRow()
public void addSubqueryCompilation(java.lang.String alias,
QueryCompilation compilation)
alias - Alias for the subquery (variable name)compilation - The compilationpublic QueryCompilation getCompilationForSubquery(java.lang.String alias)
alias - Alias of subquery
public java.lang.String[] getSubqueryAliases()
public boolean returnsSingleRow()
public java.lang.Class[] getResultTypes()
public java.lang.Class getCandidateClass()
public java.lang.String getCandidateAlias()
public SymbolTable getSymbolTable()
public Expression[] getExprResult()
public Expression[] getExprFrom()
public Expression[] getExprUpdate()
public Expression getExprFilter()
public Expression[] getExprGrouping()
public Expression getExprHaving()
public Expression[] getExprOrdering()
public ParameterExpression getParameterExpressionForPosition(int pos)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String debugString(java.lang.String indent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||