IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class RemotePassthru

java.lang.Object
  extended bycom.ibm.db2.wrapper.SqlqgBaseClass
      extended bycom.ibm.db2.wrapper.RemoteOperation
          extended bycom.ibm.db2.wrapper.RemotePassthru

public class RemotePassthru
extends RemoteOperation

The RemotePassthru class represents a pass-through session on a remote data source. An instance of your RemotePassthru subclass is created when the federated server invokes the createRemotePassthru method on an instance of the appropriate RemoteConnection subclass. If your data source does not support pass-through operations, do not implement a RemotePassthru subclass and do not override the default implementation of this method.

Since:
IBM DB2 Information Integrator Version 8.2

Constructor Summary
protected RemotePassthru(RemoteConnection activeConnection, long id)
          Construct a new pass-through object for the specified connection.
 
Method Summary
protected  void close()
          Close a pass-through cursor and allows the data source to clean up after pass-through statement processing.
protected  void describe(RuntimeDataDescList dataDescriptionList)
          Describe the result set of a statement that is processed by a pass-through operation.
protected  void execute()
          Execute a statement that returns a code and does not return a result set by a pass-through operation.
protected  void fetch()
          Fetch a row from a pass-through cursor by copying a single-result row into the output data buffer.
 java.lang.String getSQLStatement()
          Retrieve the SQL statement for the remote pass-through operation.
protected  void open()
          Open a cursor for a pass-through operation and enable the data source to return the first result row for the query.
protected  void prepare(RuntimeDataDescList dataDescriptionList)
          Prepare a pass-through operation.
protected  void reportEof()
          Report an end-of-file condition during a fetch operation.
 
Methods inherited from class com.ibm.db2.wrapper.RemoteOperation
getConnection, getExecDesc, getInputData, getOutputData, getServer, getWrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemotePassthru

protected RemotePassthru(RemoteConnection activeConnection,
                         long id)
Construct a new pass-through object for the specified connection.

Parameters:
activeConnection - The connection through which the pass-through operation is executed.
id - An integer value that represents the RemotePassthru object.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteConnection
Method Detail

close

protected void close()
              throws java.lang.Exception
Close a pass-through cursor and allows the data source to clean up after pass-through statement processing.

Throws:
java.lang.Exception - if the close operation fails.
Since:
IBM DB2 Information Integrator Version 8.2

describe

protected void describe(RuntimeDataDescList dataDescriptionList)
                 throws java.lang.Exception
Describe the result set of a statement that is processed by a pass-through operation. Populate a RuntimeDataDescList instance that describes the number and type of columns for each row of the result.

Parameters:
dataDescriptionList - The list of data descriptors for the operation.
Throws:
java.lang.Exception - if the method fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RuntimeDataDescList

execute

protected void execute()
                throws java.lang.Exception
Execute a statement that returns a code and does not return a result set by a pass-through operation.

Throws:
java.lang.Exception - if the execution process fails.
Since:
IBM DB2 Information Integrator Version 8.2

fetch

protected void fetch()
              throws java.lang.Exception
Fetch a row from a pass-through cursor by copying a single-result row into the output data buffer.

Throws:
java.lang.Exception - if the fetch operation fails.
Since:
IBM DB2 Information Integrator Version 8.2

getSQLStatement

public final java.lang.String getSQLStatement()
                                       throws WrapperException
Retrieve the SQL statement for the remote pass-through operation.

Returns:
A string value that represents the SQL statement.
Throws:
WrapperException - if the method fails.
Since:
IBM DB2 Information Integrator Version 8.2

open

protected void open()
             throws java.lang.Exception
Open a cursor for a pass-through operation and enable the data source to return the first result row for the query.

Throws:
java.lang.Exception - if the open operation fails.
Since:
IBM DB2 Information Integrator Version 8.2

prepare

protected void prepare(RuntimeDataDescList dataDescriptionList)
                throws java.lang.Exception
Prepare a pass-through operation. Sends the pass-through string to the data source and determines the number and type of the columns for each row of the result.

Parameters:
dataDescriptionList - The list of data descriptors for the operation.
Throws:
java.lang.Exception - if the prepare operation fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RuntimeDataDescList

reportEof

protected final void reportEof()
                        throws WrapperException
Report an end-of-file condition during a fetch operation. The wrapper must call this method from the fetch method when there are no more rows to retrieve.

Overrides:
reportEof in class RemoteOperation
Throws:
WrapperException - if the method fails.
Since:
IBM DB2 Information Integrator Version 8.2

IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

(C)Copyright IBM Corp. 2002. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.