net.sf.jasperreports.engine.query
public class JRJdbcQueryExecuter extends JRAbstractQueryExecuter
JRAbstractQueryExecuter.QueryParameter
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CLAUSE_ID_IN |
protected static java.lang.String |
CLAUSE_ID_NOTIN |
protected static java.lang.String |
CLOSE_CURSORS_AT_COMMIT |
protected static java.lang.String |
CONCUR_READ_ONLY |
protected static java.lang.String |
CONCUR_UPDATABLE |
protected static java.lang.String |
HOLD_CURSORS_OVER_COMMIT |
protected static java.lang.String |
TYPE_FORWARD_ONLY |
protected static java.lang.String |
TYPE_SCROLL_INSENSITIVE |
protected static java.lang.String |
TYPE_SCROLL_SENSITIVE |
CLAUSE_POSITION_ID, clauseFunctions, dataset
Constructor and Description |
---|
JRJdbcQueryExecuter(JRDataset dataset,
java.util.Map parameters) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancelQuery()
Cancels the query if it's currently running.
|
void |
close()
Closes resources kept open during the data source iteration.
|
JRDataSource |
createDatasource()
Executes the query and creates a
JRDataSource out of the result. |
protected void |
createStatement() |
protected static int |
getConcurrency(java.lang.String concurrency) |
protected static int |
getHoldability(java.lang.String holdability,
java.sql.Connection connection) |
protected java.lang.String |
getParameterReplacement(java.lang.String parameterName)
Returns the replacement text for a query paramter.
|
protected static int |
getResultSetType(java.lang.String type) |
protected void |
registerFunctions()
Registers built-in
clause functions . |
protected void |
setStatementMultiParameter(int parameterIndex,
java.lang.String parameterName,
int valueIndex,
java.lang.Object value) |
protected int |
setStatementMultiParameters(int parameterIndex,
java.lang.String parameterName) |
protected void |
setStatementParameter(int parameterIndex,
java.lang.Class parameterType,
java.lang.Object parameterValue) |
protected void |
setStatementParameter(int parameterIndex,
java.lang.String parameterName) |
addQueryMultiParameters, addQueryParameter, appendClauseChunk, appendParameterChunk, appendParameterClauseChunk, appendQueryChunk, appendTextChunk, applyClause, checkParameter, getCollectedParameterNames, getCollectedParameters, getParameter, getParameterValue, getParameterValue, getQueryString, getValueParameter, getValueParameter, parseQuery, registerClauseFunction, resolveFunction, unregisterClauseFunction
protected static final java.lang.String CLAUSE_ID_IN
protected static final java.lang.String CLAUSE_ID_NOTIN
protected static final java.lang.String TYPE_FORWARD_ONLY
protected static final java.lang.String TYPE_SCROLL_INSENSITIVE
protected static final java.lang.String TYPE_SCROLL_SENSITIVE
protected static final java.lang.String CONCUR_READ_ONLY
protected static final java.lang.String CONCUR_UPDATABLE
protected static final java.lang.String HOLD_CURSORS_OVER_COMMIT
protected static final java.lang.String CLOSE_CURSORS_AT_COMMIT
public JRJdbcQueryExecuter(JRDataset dataset, java.util.Map parameters)
protected void registerFunctions()
clause functions
.protected java.lang.String getParameterReplacement(java.lang.String parameterName)
JRAbstractQueryExecuter
getParameterReplacement
in class JRAbstractQueryExecuter
parameterName
- the paramter nameJRQueryChunk.TYPE_PARAMETER
public JRDataSource createDatasource() throws JRException
JRQueryExecuter
JRDataSource
out of the result.JRDataSource
wrapping the query execution result.JRException
protected void createStatement() throws JRException
JRException
protected void setStatementParameter(int parameterIndex, java.lang.String parameterName) throws java.sql.SQLException
java.sql.SQLException
protected int setStatementMultiParameters(int parameterIndex, java.lang.String parameterName) throws java.sql.SQLException
java.sql.SQLException
protected void setStatementMultiParameter(int parameterIndex, java.lang.String parameterName, int valueIndex, java.lang.Object value) throws java.sql.SQLException
java.sql.SQLException
protected void setStatementParameter(int parameterIndex, java.lang.Class parameterType, java.lang.Object parameterValue) throws java.sql.SQLException
java.sql.SQLException
public void close()
JRQueryExecuter
createDatasource
.public boolean cancelQuery() throws JRException
JRQueryExecuter
true
if and only if the query was running and it has been canceledJRException
protected static int getResultSetType(java.lang.String type)
protected static int getConcurrency(java.lang.String concurrency)
protected static int getHoldability(java.lang.String holdability, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com