Package org.teiid.translator.olap
Class OlapQueryExecution
- java.lang.Object
-
- org.teiid.translator.olap.OlapQueryExecution
-
- All Implemented Interfaces:
Execution,ProcedureExecution,ResultSetExecution
public class OlapQueryExecution extends Object implements ProcedureExecution
Executes the given MDX and packs the results into an array
-
-
Field Summary
Fields Modifier and Type Field Description protected Commandcommandprotected org.olap4j.OlapConnectionconnectionprotected ExecutionContextcontextprotected OlapExecutionFactoryexecutionFactory
-
Constructor Summary
Constructors Constructor Description OlapQueryExecution(List<Argument> arguments, Command command, org.olap4j.OlapConnection connection, ExecutionContext context, OlapExecutionFactory executionFactory, String mdxQuery, boolean returnsArray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancels the execution abnormally.voidclose()Terminates the execution normally.voidexecute()Execute the associated command.List<?>getOutputParameterValues()Get the output parameter values.List<?>next()Retrieves the next row of the resultset.
-
-
-
Field Detail
-
command
protected Command command
-
connection
protected org.olap4j.OlapConnection connection
-
context
protected ExecutionContext context
-
executionFactory
protected OlapExecutionFactory executionFactory
-
-
Constructor Detail
-
OlapQueryExecution
public OlapQueryExecution(List<Argument> arguments, Command command, org.olap4j.OlapConnection connection, ExecutionContext context, OlapExecutionFactory executionFactory, String mdxQuery, boolean returnsArray)
-
-
Method Detail
-
execute
public void execute() throws TranslatorExceptionDescription copied from interface:ExecutionExecute the associated command. Results will be retrieved through a specific sub-interface call.- Specified by:
executein interfaceExecution- Throws:
TranslatorException
-
cancel
public void cancel() throws TranslatorExceptionDescription copied from interface:ExecutionCancels the execution abnormally. This will happen via a different thread from the one performing the execution, so should be expected to happen in a multi-threaded scenario.- Specified by:
cancelin interfaceExecution- Throws:
TranslatorException
-
close
public void close()
Description copied from interface:ExecutionTerminates the execution normally.
-
next
public List<?> next() throws TranslatorException
Description copied from interface:ResultSetExecutionRetrieves the next row of the resultset.- Specified by:
nextin interfaceResultSetExecution- Returns:
- the next row or null indicating that there are no more results
- Throws:
TranslatorException
-
getOutputParameterValues
public List<?> getOutputParameterValues() throws TranslatorException
Description copied from interface:ProcedureExecutionGet the output parameter values. Results should place the return parameter first if it is present, then the IN/OUT and OUT parameters should follow in the order they appeared in the command.- Specified by:
getOutputParameterValuesin interfaceProcedureExecution- Throws:
TranslatorException- If an error occurs while retrieving the output value
-
-