|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.query.QueryCompiler
public class QueryCompiler
Base definition of a query compiler for a query language. Should be extended to compile details of individual query languages. This was designed for the old-style compilation process, and is being phased out. New implementations of querying in DataNucleus should make use of compilers under "org.datanucleus.query.compiler".
| Field Summary | |
|---|---|
protected java.lang.String |
candidateAlias
Alias for the candidate class. |
protected java.lang.Class |
candidateClass
Candidate class for the query. |
static int |
COMPILE_EXECUTION
|
static int |
COMPILE_EXPLICIT_PARAMETERS
|
static int |
COMPILE_EXPLICIT_VARIABLES
|
static int |
COMPILE_SYNTAX
|
protected boolean |
executionCompile
Flag for whether the current compile is for execution (using param values). |
protected Imports |
imports
Imports to use for the resolution of classes. |
protected java.lang.String |
language
Language of this query (e.g JDOQL, JPQL). |
protected static Localiser |
LOCALISER
Localiser for messages. |
protected java.util.List |
parameterNames
The parameter names. |
protected java.util.Map |
parameters
Map of parameter values, keyed by their name. |
protected java.util.Map |
parameterTypesByName
Look-up for the parameter types, keyed by the name. |
protected Query |
query
The query being compiled. |
protected java.util.List |
variableNames
List of variable names. |
protected java.util.Map |
variableTypesByName
Look-up for the variables types, keyed by the name. |
| Constructor Summary | |
|---|---|
QueryCompiler(Query query,
Imports imports,
java.util.Map parameters)
Constructor for a compiler of java queries. |
|
| Method Summary | |
|---|---|
void |
close()
Method to close the Compiler. |
java.lang.Object |
compile(int type)
Method to compile the query. |
protected void |
compileExplicitParameters()
Method to compile all parameters declared for this query. |
protected void |
compileExplicitVariables()
Method to compile all variables declared for this query. |
java.lang.String |
getCandidateAlias()
Accessor for the candidate alias. |
java.lang.Class |
getCandidateClass()
Accessor for the candidate class. |
java.lang.String[] |
getParameterNames()
Accessor for the (explicit) parameter names. |
java.util.Map |
getParameterTypesByName()
Accessor for the parameter types keyed by the parameter name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COMPILE_EXPLICIT_PARAMETERS
public static final int COMPILE_EXPLICIT_VARIABLES
public static final int COMPILE_SYNTAX
public static final int COMPILE_EXECUTION
protected static final Localiser LOCALISER
protected java.lang.String language
protected Query query
protected Imports imports
protected java.util.Map parameters
protected boolean executionCompile
protected java.lang.Class candidateClass
protected java.lang.String candidateAlias
protected java.util.List parameterNames
protected java.util.Map parameterTypesByName
protected java.util.List variableNames
protected java.util.Map variableTypesByName
| Constructor Detail |
|---|
public QueryCompiler(Query query,
Imports imports,
java.util.Map parameters)
query - The query to compileimports - The imports to useparameters - Any parameters| Method Detail |
|---|
public void close()
public java.lang.Object compile(int type)
type - Type of compilation. This compiler only supports explicit parameters, explicit variables
public java.lang.Class getCandidateClass()
public java.lang.String getCandidateAlias()
public java.lang.String[] getParameterNames()
public java.util.Map getParameterTypesByName()
protected void compileExplicitParameters()
protected void compileExplicitVariables()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||