Package org.teiid.translator.google
Class AbstractSpreadsheetExecution
- java.lang.Object
-
- org.teiid.translator.google.AbstractSpreadsheetExecution
-
- All Implemented Interfaces:
Execution
,UpdateExecution
- Direct Known Subclasses:
SpreadsheetUpdateExecution
public abstract class AbstractSpreadsheetExecution extends Object implements UpdateExecution
-
-
Field Summary
Fields Modifier and Type Field Description protected Command
command
protected GoogleSpreadsheetConnection
connection
protected ExecutionContext
context
protected RuntimeMetadata
metadata
protected UpdateResult
result
-
Constructor Summary
Constructors Constructor Description AbstractSpreadsheetExecution(Command command, GoogleSpreadsheetConnection connection, ExecutionContext context, RuntimeMetadata metadata)
-
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.GoogleSpreadsheetConnection
getConnection()
int[]
getUpdateCounts()
Returns the update counts for the execution.
-
-
-
Field Detail
-
connection
protected GoogleSpreadsheetConnection connection
-
metadata
protected RuntimeMetadata metadata
-
context
protected ExecutionContext context
-
command
protected Command command
-
result
protected UpdateResult result
-
-
Constructor Detail
-
AbstractSpreadsheetExecution
public AbstractSpreadsheetExecution(Command command, GoogleSpreadsheetConnection connection, ExecutionContext context, RuntimeMetadata metadata)
-
-
Method Detail
-
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
-
getUpdateCounts
public int[] getUpdateCounts() throws DataNotAvailableException, TranslatorException
Description copied from interface:UpdateExecution
Returns the update counts for the execution.
A single positive integer value is expected for non bulk/batch commands.
bulk/batch should return an integer for each value/command. 0 or greater for successful update count, -2 for no info, -3 failure- Specified by:
getUpdateCounts
in interfaceUpdateExecution
- Returns:
- the update counts corresponding to the command executed
- Throws:
DataNotAvailableException
TranslatorException
-
getConnection
public GoogleSpreadsheetConnection getConnection()
-
-