public class Olap4jMondrianQueryExecuter extends JRAbstractQueryExecuter
JRAbstractQueryExecuter.QueryParameter, JRAbstractQueryExecuter.QueryParameterEntry, JRAbstractQueryExecuter.QueryParameterVisitor, JRAbstractQueryExecuter.ValuedQueryParameter, JRAbstractQueryExecuter.VisitExceptionWrapper
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_CONNECTION_ERROR |
static String |
EXCEPTION_MESSAGE_KEY_EXECUTE_QUERY_ERROR |
static String |
OLAP4J_DRIVER |
static String |
OLAP4J_JDBC_CATALOG |
static String |
OLAP4J_JDBC_DRIVERS |
static String |
OLAP4J_JDBC_PASSWORD |
static String |
OLAP4J_JDBC_URL |
static String |
OLAP4J_JDBC_USER |
static String |
OLAP4J_MONDRIAN_DRIVER_CLASS |
static String |
OLAP4J_MONDRIAN_URL_PREFIX |
static String |
OLAP4J_URL_PREFIX |
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 |
---|
Olap4jMondrianQueryExecuter(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.
|
JROlapResult |
getResult() |
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
public static final String EXCEPTION_MESSAGE_KEY_CONNECTION_ERROR
public static final String EXCEPTION_MESSAGE_KEY_EXECUTE_QUERY_ERROR
public static final String OLAP4J_DRIVER
public static final String OLAP4J_URL_PREFIX
public static final String OLAP4J_JDBC_DRIVERS
public static final String OLAP4J_JDBC_URL
public static final String OLAP4J_JDBC_CATALOG
public static final String OLAP4J_JDBC_USER
public static final String OLAP4J_JDBC_PASSWORD
public static final String OLAP4J_MONDRIAN_DRIVER_CLASS
public static final String OLAP4J_MONDRIAN_URL_PREFIX
public Olap4jMondrianQueryExecuter(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
public boolean cancelQuery() throws JRException
JRQueryExecuter
true
if and only if the query was running and it has been canceledJRException
public JROlapResult getResult()
public void close()
JRQueryExecuter
createDatasource
.Copyright © 2016. All rights reserved.