public class JsonQueryExecuter extends JRAbstractQueryExecuter
JRAbstractQueryExecuter.QueryParameter, JRAbstractQueryExecuter.QueryParameterEntry, JRAbstractQueryExecuter.QueryParameterVisitor, JRAbstractQueryExecuter.ValuedQueryParameter, JRAbstractQueryExecuter.VisitExceptionWrapper
Modifier and Type | Field and Description |
---|---|
protected static String |
CANONICAL_LANGUAGE |
CLAUSE_POSITION_ID, clauseFunctions, dataset, EXCEPTION_MESSAGE_KEY_NUMERIC_TYPE_REQUIRED, EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND, EXCEPTION_MESSAGE_KEY_QUERY_CLAUSE_CIRCULARLY_NESTED_PARAMETER, EXCEPTION_MESSAGE_KEY_QUERY_CLAUSE_ID_FIRST_TOKEN_MISSING, EXCEPTION_MESSAGE_KEY_QUERY_CLAUSE_NOT_FOUND, EXCEPTION_MESSAGE_KEY_UNSUPPORTED_PARAMETER_TYPE, GET_COLLECTED
Constructor and Description |
---|
JsonQueryExecuter(JasperReportsContext jasperReportsContext,
JRDataset dataset,
Map<String,? extends JRValueParameter> parametersMap) |
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 String |
getCanonicalQueryLanguage()
Returns a canonical query language for this query executer implementation.
|
protected String |
getParameterReplacement(String parameterName)
Returns the replacement text for a query parameter.
|
protected TextDataSourceAttributes |
getTextAttributes() |
addQueryMultiParameters, addQueryMultiParameters, addQueryParameter, addQueryParameter, appendClauseChunk, appendParameterChunk, appendParameterClauseChunk, appendQueryChunk, appendTextChunk, applyClause, checkParameter, findExtensionQueryFunction, getBooleanParameter, getBooleanParameter, getBooleanParameterOrProperty, getBooleanParameterOrProperty, getCollectedParameterNames, getCollectedParameters, getJasperReportsContext, getParameter, getParameterValue, getParameterValue, getPropertiesUtil, getQueryString, getStringParameter, getStringParameterOrProperty, getValueParameter, getValueParameter, parameterHasValue, parseQuery, registerClauseFunction, resolveFunction, unregisterClauseFunction, visitQueryParameters
protected static final String CANONICAL_LANGUAGE
public JsonQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
protected String getCanonicalQueryLanguage()
JRAbstractQueryExecuter
The canonical language is used to retrieve extensions for the query executer.
The default implementation returns the runtime query language used in the dataset, but query executer implementations should override this method and return a fixed language.
getCanonicalQueryLanguage
in class JRAbstractQueryExecuter
protected String getParameterReplacement(String parameterName)
JRAbstractQueryExecuter
getParameterReplacement
in class JRAbstractQueryExecuter
parameterName
- the parameter nameJRQueryChunk.TYPE_PARAMETER
public JRDataSource createDatasource() throws JRException
JRQueryExecuter
JRDataSource
out of the result.JRDataSource
wrapping the query execution result.JRException
protected TextDataSourceAttributes getTextAttributes()
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
Copyright © 2017. All rights reserved.