public class JRXPathQueryExecuter extends JRAbstractQueryExecuter
PARAMETER_XML_DATA_DOCUMENT
parameter.
All the parameters in the XPath query are replaced by calling String.valueOf(Object)
on the parameter value.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 |
|---|
JRXPathQueryExecuter(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.
|
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, visitQueryParametersprotected static final String CANONICAL_LANGUAGE
public JRXPathQueryExecuter(JasperReportsContext jasperReportsContext, JRDataset dataset, Map<String,? extends JRValueParameter> parametersMap)
protected String getCanonicalQueryLanguage()
JRAbstractQueryExecuterThe 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 JRAbstractQueryExecuterprotected String getParameterReplacement(String parameterName)
JRAbstractQueryExecutergetParameterReplacement in class JRAbstractQueryExecuterparameterName - the parameter nameJRQueryChunk.TYPE_PARAMETERpublic JRDataSource createDatasource() throws JRException
JRQueryExecuterJRDataSource out of the result.JRDataSource wrapping the query execution result.JRExceptionpublic void close()
JRQueryExecutercreateDatasource.public boolean cancelQuery()
throws JRException
JRQueryExecutertrue if and only if the query was running and it has been canceledJRExceptionCopyright © 2017. All rights reserved.