org.teiid.translator.salesforce.execution
Class AbstractUpdateExecution

java.lang.Object
  extended by org.teiid.translator.salesforce.execution.AbstractUpdateExecution
All Implemented Interfaces:
Execution, UpdateExecution
Direct Known Subclasses:
DeleteExecutionImpl, InsertExecutionImpl, UpdateExecutionImpl

public abstract class AbstractUpdateExecution
extends java.lang.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
protected  Command command
           
protected  SalesforceConnection connection
           
protected  ExecutionContext context
           
protected  RuntimeMetadata metadata
           
protected  int result
           
 
Constructor Summary
AbstractUpdateExecution(Command command, SalesforceConnection salesforceConnection, RuntimeMetadata metadata, ExecutionContext context)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.teiid.translator.Execution
execute
 

Field Detail

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(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 interface Execution
Throws:
TranslatorException

close

public void close()
Description copied from interface: Execution
Terminates the execution normally.

Specified by:
close in interface Execution

getUpdateCounts

public int[] getUpdateCounts()
                      throws DataNotAvailableException,
                             TranslatorException
Description copied from interface: UpdateExecution
Returns the update counts for the execution.

Specified by:
getUpdateCounts in interface UpdateExecution
Returns:
the update counts corresponding to the command executed
Throws:
DataNotAvailableException
TranslatorException

getMetadata

public RuntimeMetadata getMetadata()

getConnection

public SalesforceConnection getConnection()


Copyright © 2011. All Rights Reserved.