public interface QueryGenerator
Modifier and Type | Method and Description |
---|---|
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,
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.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.
|
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.
|
boolean |
processingOnClause() |
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).
|
String getQueryLanguage()
org.datanucleus.ClassLoaderResolver getClassLoaderResolver()
org.datanucleus.ExecutionContext getExecutionContext()
org.datanucleus.query.compiler.CompilationComponent getCompilationComponent()
Object getProperty(String name)
name
- The property namevoid useParameterExpressionAsLiteral(SQLLiteral paramLiteral)
paramLiteral
- The parameter expressionClass getTypeOfVariable(String varName)
varName
- Name of the variablevoid bindVariable(String varName, org.datanucleus.metadata.AbstractClassMetaData cmd, SQLTable sqlTbl, JavaTypeMapping mapping)
varName
- Variable namecmd
- Metadata for this variable typesqlTbl
- Table for this variablemapping
- The mapping of this variable in the tableSQLExpression bindVariable(UnboundExpression expr, Class type)
expr
- Unbound expressiontype
- The type to bind asboolean hasExplicitJoins()
boolean processingOnClause()
void bindParameter(String paramName, Class type)
paramName
- Name of the parametertype
- The type (or subclass)Class resolveClass(String className)
className
- The class nameboolean hasExtension(String key)
key
- Extension nameCopyright © 2017. All rights reserved.