Class RDBMSQueryCompilation
- java.lang.Object
-
- org.datanucleus.store.rdbms.query.RDBMSQueryCompilation
-
public class RDBMSQueryCompilation extends java.lang.Object
Datastore-specific (RDBMS) compilation information for a java query. Can represent a single SQL statement, or can represent multiple SQL statements all with the same results and parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
RDBMSQueryCompilation.StatementCompilation
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map<java.lang.Integer,java.lang.String>
inputParameterNameByPosition
Map of input parameter name keyed by its position.(package private) java.util.List<SQLStatementParameter>
inputParameters
Input parameter definitions, in the order used in the SQL.(package private) boolean
precompilable
(package private) StatementResultMapping
resultsDefinition
Result mappings when the result is not for a candidate (can be null).(package private) StatementClassMapping
resultsDefinitionForClass
Result mappings when the result is for a candidate (can be null).(package private) java.util.Map<java.lang.String,IteratorStatement>
scoIteratorStatementByMemberName
Map of statements to get SCO containers that are in the fetch plan (bulk fetch).(package private) java.util.List<RDBMSQueryCompilation.StatementCompilation>
statementCompilations
-
Constructor Summary
Constructors Constructor Description RDBMSQueryCompilation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatement(SQLStatement stmt, java.lang.String sql, boolean useInCount)
void
clearStatements()
int
getNumberOfStatements()
java.util.Map<java.lang.Integer,java.lang.String>
getParameterNameByPosition()
StatementResultMapping
getResultDefinition()
StatementClassMapping
getResultDefinitionForClass()
java.util.Map<java.lang.String,IteratorStatement>
getSCOIteratorStatements()
java.lang.String
getSQL()
Convenience accessor for the SQL to invoke, when we only have 1 statement associated with this compilation.java.util.List<RDBMSQueryCompilation.StatementCompilation>
getStatementCompilations()
java.util.List<SQLStatementParameter>
getStatementParameters()
boolean
isPrecompilable()
void
setParameterNameByPosition(java.util.Map<java.lang.Integer,java.lang.String> paramNameByPos)
void
setPrecompilable(boolean precompilable)
void
setResultDefinition(StatementResultMapping def)
void
setResultDefinitionForClass(StatementClassMapping def)
void
setSCOIteratorStatement(java.lang.String memberName, IteratorStatement iterStmt)
void
setStatementParameters(java.util.List<SQLStatementParameter> params)
-
-
-
Field Detail
-
statementCompilations
java.util.List<RDBMSQueryCompilation.StatementCompilation> statementCompilations
-
inputParameters
java.util.List<SQLStatementParameter> inputParameters
Input parameter definitions, in the order used in the SQL.
-
inputParameterNameByPosition
java.util.Map<java.lang.Integer,java.lang.String> inputParameterNameByPosition
Map of input parameter name keyed by its position. Only for SELECT queries.
-
resultsDefinitionForClass
StatementClassMapping resultsDefinitionForClass
Result mappings when the result is for a candidate (can be null). Only for SELECT queries.
-
resultsDefinition
StatementResultMapping resultsDefinition
Result mappings when the result is not for a candidate (can be null). Only for SELECT queries.
-
scoIteratorStatementByMemberName
java.util.Map<java.lang.String,IteratorStatement> scoIteratorStatementByMemberName
Map of statements to get SCO containers that are in the fetch plan (bulk fetch). Only for SELECT queries.
-
precompilable
boolean precompilable
-
-
Method Detail
-
getNumberOfStatements
public int getNumberOfStatements()
-
clearStatements
public void clearStatements()
-
addStatement
public void addStatement(SQLStatement stmt, java.lang.String sql, boolean useInCount)
-
getStatementCompilations
public java.util.List<RDBMSQueryCompilation.StatementCompilation> getStatementCompilations()
-
getSQL
public java.lang.String getSQL()
Convenience accessor for the SQL to invoke, when we only have 1 statement associated with this compilation. Use getStatementCompilations to get the SQLs when we have multiple statements.- Returns:
- The SQL to be invoked
-
setPrecompilable
public void setPrecompilable(boolean precompilable)
-
isPrecompilable
public boolean isPrecompilable()
-
setResultDefinitionForClass
public void setResultDefinitionForClass(StatementClassMapping def)
-
getResultDefinitionForClass
public StatementClassMapping getResultDefinitionForClass()
-
setResultDefinition
public void setResultDefinition(StatementResultMapping def)
-
getResultDefinition
public StatementResultMapping getResultDefinition()
-
setStatementParameters
public void setStatementParameters(java.util.List<SQLStatementParameter> params)
-
getStatementParameters
public java.util.List<SQLStatementParameter> getStatementParameters()
-
setParameterNameByPosition
public void setParameterNameByPosition(java.util.Map<java.lang.Integer,java.lang.String> paramNameByPos)
-
getParameterNameByPosition
public java.util.Map<java.lang.Integer,java.lang.String> getParameterNameByPosition()
-
setSCOIteratorStatement
public void setSCOIteratorStatement(java.lang.String memberName, IteratorStatement iterStmt)
-
getSCOIteratorStatements
public java.util.Map<java.lang.String,IteratorStatement> getSCOIteratorStatements()
-
-