public class JRXmlaQueryExecuter extends JRAbstractQueryExecuter
JRAbstractQueryExecuter.QueryParameter, JRAbstractQueryExecuter.QueryParameterEntry, JRAbstractQueryExecuter.QueryParameterVisitor, JRAbstractQueryExecuter.ValuedQueryParameter, JRAbstractQueryExecuter.VisitExceptionWrapper
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_MESSAGE_CALL_FAILED |
static String |
EXCEPTION_MESSAGE_KEY_XMLA_CANNOT_RETRIEVE_ELEMENT |
static String |
EXCEPTION_MESSAGE_KEY_XMLA_NO_LEVEL_NAME |
static String |
EXCEPTION_MESSAGE_KEY_XMLA_NULL_ELEMENT |
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 |
---|
JRXmlaQueryExecuter(JasperReportsContext jasperReportsContext,
JRDataset dataset,
Map<String,? extends JRValueParameter> parametersMap) |
Modifier and Type | Method and Description |
---|---|
protected void |
addParameterList(SOAPEnvelope envelope,
SOAPElement eParent,
String typeName,
String listName,
Map<String,String> params) |
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 SOAPMessage |
createQueryMessage() |
protected SOAPConnection |
createSOAPConnection() |
protected SOAPMessage |
executeQuery(SOAPMessage message,
URL url)
Sends the SOAP Message over the connection and returns the
Result-SOAP-Message
|
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() |
protected String |
getSoapUrl() |
protected void |
handleCellErrors(Iterator<?> errorElems) |
protected void |
handleHierInfo(JRXmlaResultAxis axis,
SOAPElement hierInfoElement) |
protected void |
handleResultFault(SOAPFault fault) |
protected void |
handleTupleElement(JRXmlaResultAxis axis,
SOAPElement tupleElement) |
protected void |
handleTuplesElement(JRXmlaResultAxis axis,
SOAPElement tuplesElement) |
protected void |
parseAxesElement(SOAPElement axesElement) |
protected void |
parseAxesInfoElement(SOAPElement axesInfoElement) |
protected void |
parseCellDataElement(SOAPElement cellDataElement) |
protected void |
parseOLAPInfoElement(SOAPElement olapInfoElement) |
protected void |
parseResult(SOAPMessage reply)
Parses the result-Message into this class's structure
|
protected String |
prettyPrintSOAP(SOAPElement element) |
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_XMLA_CANNOT_RETRIEVE_ELEMENT
public static final String EXCEPTION_MESSAGE_KEY_MESSAGE_CALL_FAILED
public static final String EXCEPTION_MESSAGE_KEY_XMLA_NO_LEVEL_NAME
public static final String EXCEPTION_MESSAGE_KEY_XMLA_NULL_ELEMENT
public JRXmlaQueryExecuter(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 JROlapResult getResult()
public JRDataSource createDatasource() throws JRException
JRQueryExecuter
JRDataSource
out of the result.JRDataSource
wrapping the query execution result.JRException
protected String getSoapUrl() throws MalformedURLException
MalformedURLException
public boolean cancelQuery() throws JRException
JRQueryExecuter
true
if and only if the query was running and it has been canceledJRException
public void close()
JRQueryExecuter
createDatasource
.protected SOAPConnection createSOAPConnection()
protected SOAPMessage createQueryMessage()
protected void addParameterList(SOAPEnvelope envelope, SOAPElement eParent, String typeName, String listName, Map<String,String> params) throws SOAPException
SOAPException
protected SOAPMessage executeQuery(SOAPMessage message, URL url)
protected void parseResult(SOAPMessage reply) throws SOAPException
reply
- The reply-Message from the ServerSOAPException
protected void handleResultFault(SOAPFault fault)
protected void parseOLAPInfoElement(SOAPElement olapInfoElement) throws SOAPException
SOAPException
protected void parseAxesInfoElement(SOAPElement axesInfoElement) throws SOAPException
SOAPException
protected void parseAxesElement(SOAPElement axesElement) throws SOAPException
SOAPException
protected void parseCellDataElement(SOAPElement cellDataElement) throws SOAPException
SOAPException
protected void handleCellErrors(Iterator<?> errorElems) throws SOAPException
SOAPException
protected void handleHierInfo(JRXmlaResultAxis axis, SOAPElement hierInfoElement) throws SOAPException
SOAPException
protected void handleTuplesElement(JRXmlaResultAxis axis, SOAPElement tuplesElement) throws SOAPException
SOAPException
protected void handleTupleElement(JRXmlaResultAxis axis, SOAPElement tupleElement) throws SOAPException
SOAPException
protected String prettyPrintSOAP(SOAPElement element)
Copyright © 2016. All rights reserved.