com.sapportals.connector.execution.objects

Interface IExecution


public interface IExecution

The base interface for execution of operations defined in the language package.


Method Summary
 void cancel()
          cancels the operation (for asynchronous execution)
 void close()
          Releases the execution object.
 int execute(IOperation operation)
          Execute the operation after translating it to connector-specific language
 int getQueryChunkSize()
          Returns the maximum rows number in a RecordSet that is received as a return value of the retrieveResultSet() method.
 int getTimeOut()
          Returns the maximum time to execute the operation.
 boolean nextRecordSet()
          Moves to the next record set.
 IRecordSet retrieveRecordSet()
          Returns the current record set.
 void setQueryChunkSize(int chunkSize)
          Sets the maximum rows number in a RecordSet that is received as a return value of the retrieveResultSet() method.
 void setTimeOut(int msTimeOut)
          Sets the maximum time to operation the query.
 

Method Detail

setTimeOut

void setTimeOut(int msTimeOut)
Sets the maximum time to operation the query.

Parameters:
msTimeOut - the time to wait in milliseconds

getTimeOut

int getTimeOut()
Returns the maximum time to execute the operation.

Returns:
the time to wait in milliseconds

setQueryChunkSize

void setQueryChunkSize(int chunkSize)
Sets the maximum rows number in a RecordSet that is received as a return value of the retrieveResultSet() method. The result of an execution of a query is a record set. In order to be able to control the number of rows that are retrieved from the query result, set the chunk size to that number of rows, and use the next() method to move to the next chunk.

Parameters:
chunkSize - the number of rows for each record set chunk

getQueryChunkSize

int getQueryChunkSize()
Returns the maximum rows number in a RecordSet that is received as a return value of the retrieveResultSet() method.

Returns:
int the number of rows for each result set chunk

execute

int execute(IOperation operation)
            throws ExecutionException,
                   ConnectorException
Execute the operation after translating it to connector-specific language

Parameters:
operation - the operation object to execute
Returns:
int the number of rows affected if relevant, otherwise 0;
Throws:
ExecutionException
ConnectorException

retrieveRecordSet

IRecordSet retrieveRecordSet()
                             throws ConnectorException
Returns the current record set. The interface IRecordSet is a set of rows (a subset of java.sql.ResultSet). The number of rows in every record set is determined using the method setQueryChunkSize(). Subsequent calls to retrieveRecordSet() return the same record set object

Returns:
IResultSet the current result set
Throws:
ConnectorException

nextRecordSet

boolean nextRecordSet()
                      throws ConnectorException
Moves to the next record set. The interface IRecordSet is a set of rows (a subset of java.sql.ResultSet). The number of rows in every record set is determined using the method setQueryChunkSize()

Returns:
boolean determine whether this is the last result set
Throws:
ConnectorException

close

void close()
           throws ConnectorException
Releases the execution object.

Throws:
ConnectorException

cancel

void cancel()
            throws ConnectorException
cancels the operation (for asynchronous execution)

Throws:
ConnectorException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] FRAMEWORK-EXT [sap.com] tc/conn/connectorframeworkdeprecated - EP-CON-CF
[sap.com] FRAMEWORK-EXT [sap.com] tc/conn/connectorframeworkdeprecated default EP-CON-CF
[sap.com] EP-BASIS-API [sap.com] tc/epbc/connectivityfw/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice