Class AbstractUpdateExecution
- java.lang.Object
-
- org.teiid.translator.salesforce.execution.AbstractUpdateExecution
-
- All Implemented Interfaces:
Execution
,UpdateExecution
- Direct Known Subclasses:
DeleteUpdateExecutionImpl
,InsertExecutionImpl
public abstract class AbstractUpdateExecution extends Object implements UpdateExecution
Parent class to the Update, Delete, and Insert execution classes. Provisions the correct impl and contains some common code to get IDs of Salesforce objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected Command
command
protected SalesforceConnection
connection
protected ExecutionContext
context
protected SalesForceExecutionFactory
executionFactory
protected RuntimeMetadata
metadata
protected int
result
-
Constructor Summary
Constructors Constructor Description AbstractUpdateExecution(SalesForceExecutionFactory ef, Command command, SalesforceConnection salesforceConnection, RuntimeMetadata metadata, ExecutionContext context)
-
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.SalesforceConnection
getConnection()
RuntimeMetadata
getMetadata()
int[]
getUpdateCounts()
Returns the update counts for the execution.
-
-
-
Field Detail
-
executionFactory
protected SalesForceExecutionFactory executionFactory
-
connection
protected SalesforceConnection connection
-
metadata
protected RuntimeMetadata metadata
-
context
protected ExecutionContext context
-
command
protected Command command
-
result
protected int result
-
-
Constructor Detail
-
AbstractUpdateExecution
public AbstractUpdateExecution(SalesForceExecutionFactory ef, Command command, SalesforceConnection salesforceConnection, RuntimeMetadata metadata, ExecutionContext context)
-
-
Method Detail
-
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
-
close
public void close()
Description copied from interface:Execution
Terminates the execution normally.
-
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
-
getMetadata
public RuntimeMetadata getMetadata()
-
getConnection
public SalesforceConnection getConnection()
-
-