SAP J2EE Engine

Version 6.40


com.sapportals.connector.execution.objects
Interface IExecution


public interface IExecution

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

Version:
1.0

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

public void setTimeOut(int msTimeOut)
Sets the maximum time to operation the query.
Parameters:
msTimeOut - The time to wait in milliseconds.

getTimeOut

public int getTimeOut()
Returns the maximum time to execute the operation.
Returns:
The time to wait in milliseconds.

setQueryChunkSize

public 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

public 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

public 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 -  

retrieveRecordSet

public 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

nextRecordSet

public 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.

close

public void close()
           throws ConnectorException
Releases the execution object.

cancel

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

SAP J2EE Engine

Version 6.40


Copyright © 2001-2005 SAP AG. All Rights Reserved.