Package org.teiid.translator.excel
Class BaseExcelExecution
- java.lang.Object
-
- org.teiid.translator.excel.BaseExcelExecution
-
- All Implemented Interfaces:
Execution
- Direct Known Subclasses:
ExcelExecution
,ExcelUpdateExecution
public class BaseExcelExecution extends Object implements Execution
-
-
Field Summary
Fields Modifier and Type Field Description protected VirtualFileConnection
connection
protected org.apache.poi.ss.usermodel.FormulaEvaluator
evaluator
protected ExecutionContext
executionContext
protected boolean
immutable
protected RuntimeMetadata
metadata
protected Iterator<org.apache.poi.ss.usermodel.Row>
rowIterator
protected ExcelQueryVisitor
visitor
protected org.apache.poi.ss.usermodel.Workbook
workbook
-
Constructor Summary
Constructors Constructor Description BaseExcelExecution(ExecutionContext executionContext, RuntimeMetadata metadata, VirtualFileConnection connection, boolean immutable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancels the execution abnormally.void
close()
Terminates the execution normally.void
execute()
Execute the associated command.protected VirtualFile
getCurrentXLSFile()
protected VirtualFile
getNextXLSFile()
org.apache.poi.ss.usermodel.Row
nextRow()
void
setDataFormatter(org.apache.poi.ss.usermodel.DataFormatter dataFormatter)
void
visit(LanguageObject command)
-
-
-
Field Detail
-
executionContext
protected ExecutionContext executionContext
-
metadata
protected RuntimeMetadata metadata
-
connection
protected VirtualFileConnection connection
-
immutable
protected boolean immutable
-
rowIterator
protected Iterator<org.apache.poi.ss.usermodel.Row> rowIterator
-
visitor
protected ExcelQueryVisitor visitor
-
evaluator
protected org.apache.poi.ss.usermodel.FormulaEvaluator evaluator
-
workbook
protected org.apache.poi.ss.usermodel.Workbook workbook
-
-
Constructor Detail
-
BaseExcelExecution
public BaseExcelExecution(ExecutionContext executionContext, RuntimeMetadata metadata, VirtualFileConnection connection, boolean immutable)
-
-
Method Detail
-
visit
public void visit(LanguageObject command) throws TranslatorException
- Throws:
TranslatorException
-
execute
public void execute() throws TranslatorException
Description copied from interface:Execution
Execute the associated command. Results will be retrieved through a specific sub-interface call.- Specified by:
execute
in interfaceExecution
- Throws:
TranslatorException
-
nextRow
public org.apache.poi.ss.usermodel.Row nextRow() throws TranslatorException, DataNotAvailableException
-
getNextXLSFile
protected VirtualFile getNextXLSFile() throws TranslatorException
- Throws:
TranslatorException
-
getCurrentXLSFile
protected VirtualFile getCurrentXLSFile()
-
close
public void close()
Description copied from interface:Execution
Terminates the execution normally.
-
cancel
public void cancel() throws TranslatorException
Description copied from interface:Execution
Cancels 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:
cancel
in interfaceExecution
- Throws:
TranslatorException
-
setDataFormatter
public void setDataFormatter(org.apache.poi.ss.usermodel.DataFormatter dataFormatter)
-
-