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

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
ConnectorException

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
Throws:
ConnectorException

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.
Throws:
ConnectorException

close

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

Throws:
ConnectorException

cancel

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

Throws:
ConnectorException


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.