|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface QueryGenerator
Interface for a generator of query statements.
| Method Summary | |
|---|---|
void |
bindParameter(String paramName,
Class type)
Method to bind the specified parameter to the defined type. |
void |
bindVariable(String varName,
org.datanucleus.metadata.AbstractClassMetaData cmd,
SQLTable sqlTbl,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Method to bind the specified variable to the table and mapping. |
SQLExpression |
bindVariable(UnboundExpression expr,
Class type)
Method to bind the specified unbound variable (as cross join). |
org.datanucleus.ClassLoaderResolver |
getClassLoaderResolver()
Accessor for the ClassLoader resolver to use when looking up classes. |
org.datanucleus.query.compiler.CompilationComponent |
getCompilationComponent()
Accessor for the current query component being compiled. |
org.datanucleus.store.ExecutionContext |
getExecutionContext()
Accessor for the ExecutionContext for this query. |
Object |
getProperty(String name)
Accessor for a property affecting the query compilation. |
String |
getQueryLanguage()
Accessor for the query language that this query pertains to. |
SQLTable |
getSQLTableForAlias(String alias)
Method to return the SQLTable for the specified primary expression "alias". |
Class |
getTypeOfVariable(String varName)
Accessor for the type of a variable if already known (declared?). |
Object |
getValueForExtension(String key)
Accessor for the value of the specified query extension (or null if not defined). |
boolean |
hasExplicitJoins()
Accessor for whether the query has explicit joins. |
boolean |
hasExtension(String key)
Accessor for whether the query being generated has the specified extension. |
Class |
resolveClass(String className)
Convenience method to resolve a class name. |
void |
useParameterExpressionAsLiteral(SQLLiteral paramLiteral)
Method to instruct the generator to convert the provided parameter expression to just be a literal using the value of the parameter (hence the statement cannot be precompilable since the value needs to be known). |
| Method Detail |
|---|
String getQueryLanguage()
org.datanucleus.ClassLoaderResolver getClassLoaderResolver()
org.datanucleus.store.ExecutionContext getExecutionContext()
org.datanucleus.query.compiler.CompilationComponent getCompilationComponent()
Object getProperty(String name)
name - The property name
void useParameterExpressionAsLiteral(SQLLiteral paramLiteral)
paramLiteral - The parameter expressionClass getTypeOfVariable(String varName)
varName - Name of the variable
void bindVariable(String varName,
org.datanucleus.metadata.AbstractClassMetaData cmd,
SQLTable sqlTbl,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
varName - Variable namecmd - Metadata for this variable typesqlTbl - Table for this variablemapping - The mapping of this variable in the table
SQLExpression bindVariable(UnboundExpression expr,
Class type)
expr - Unbound expressiontype - The type to bind as
boolean hasExplicitJoins()
void bindParameter(String paramName,
Class type)
paramName - Name of the parametertype - The type (or subclass)SQLTable getSQLTableForAlias(String alias)
alias - The alias ("this", fieldName)
Class resolveClass(String className)
className - The class name
boolean hasExtension(String key)
key - Extension name
Object getValueForExtension(String key)
key - Extension name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||