com.ibm.websphere.rsadapter
Interface WSRelationalPushDownHelper

All Superinterfaces:
WSPushDownHelper

public interface WSRelationalPushDownHelper
extends WSPushDownHelper

This interface provides helper methods that can be used by customers in their implementations of their UserDefinedPushDownMethods classes. This sub-interface adds relational-specific helpers beyond the generic helpers available in the super-interface.

Since:
WBI-SF 5.1

Method Summary
 javax.resource.cci.ResultSet createCCIResultSet(java.sql.ResultSet resultSet, java.lang.Object connection)
          This method creates a CCI ResultSet corresponding to the given SQL ResultSet.
 sqlj.runtime.ref.DefaultContext getConnectionContext(java.lang.Object conn)
          This method returns a SQLj connection context.
 java.sql.CallableStatement prepareCall(java.lang.Object conn, java.lang.String sql)
          This method gets a JDBC CallableStatement from the connection with the given SQL statement.
 java.sql.CallableStatement prepareCall(java.lang.Object conn, java.lang.String sql, int resultSetType, int resultSetConcurrency)
          This method gets a JDBC CallableStatement from the connection with the given SQL statement.
 void returnCCIResultSet(javax.resource.cci.ResultSet resultSet)
          This method returns a CCI ResultSet to the cache.
 
Methods inherited from interface com.ibm.websphere.rsadapter.WSPushDownHelper
createCCIIndexedRecord, createCCIRecord, createResourceException, createResourceException, returnCCIIndexedRecord
 

Method Detail

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.Object conn,
                                              java.lang.String sql)
                                       throws javax.resource.ResourceException

This method gets a JDBC CallableStatement from the connection with the given SQL statement.

Parameters:
conn - the connection from which to get the statement. This should be the connection object passed in to the method of the UserDefinedPushDownMethods implementation class.
sql - the SQL statement.
Returns:
A WebSphere CallableStatement
Throws:
javax.resource.ResourceException - thrown if an error occurs getting the CallableStatement.
Since:
WBI-SF 5.1

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.Object conn,
                                              java.lang.String sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
                                       throws javax.resource.ResourceException

This method gets a JDBC CallableStatement from the connection with the given SQL statement.

Parameters:
conn - the connection from which to get the statement. This should be the connection object passed in to the method of the UserDefinedPushDownMethods implementation class.
sql - the SQL statement.
resultSetType - a result set type; see ResultSet.TYPE_XXX
resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
A WebSphere CallableStatement
Throws:
javax.resource.ResourceException - thrown if an error occurs getting the CallableStatement.
Since:
WBI-SF 5.1

createCCIResultSet

public javax.resource.cci.ResultSet createCCIResultSet(java.sql.ResultSet resultSet,
                                                       java.lang.Object connection)
                                                throws javax.resource.ResourceException

This method creates a CCI ResultSet corresponding to the given SQL ResultSet. Such a CCI ResultSet can be returned from a method in the UserDefinedPushDownMethodsImpl, if the data in the result set is arranged in expected order (as documented in the generated JavaDoc comments for the UserDefinedPushDownMethodsImpl method).

If the specified object is already a javax.resource.cci.ResultSet, this method will return the specified object unchanged. Otherwise, this java.sql.ResultSet object will be wrapped in a CCI ResultSet.

Parameters:
resultSet - an SQL ResultSet to be wrapped in the CCI ResultSet.
connection - the connection object passed in to the method of the UserDefinedPushDownMethods implementation class.
Returns:
a CCI ResultSet
Throws:
javax.resource.ResourceException - thrown if an error occurs creating the CCI ResultSet
Since:
WBI-SF 5.1

returnCCIResultSet

public void returnCCIResultSet(javax.resource.cci.ResultSet resultSet)
                        throws javax.resource.ResourceException

This method returns a CCI ResultSet to the cache.

Parameters:
resultSet - a CCI ResultSet
Throws:
javax.resource.ResourceException - thrown if an error occurs returning the CCI ResultSet to the cache
Since:
WBI-SF 5.1

getConnectionContext

public sqlj.runtime.ref.DefaultContext getConnectionContext(java.lang.Object conn)
                                                     throws javax.resource.ResourceException

This method returns a SQLj connection context. This context contains the physical connection.

Parameters:
conn - the connection from which to get the context. This should be the connection object passed in to the method of the UserDefinedPushDownMethods implementation class.
Returns:
a SQLj connection context
Throws:
javax.resource.ResourceException - thrown if an error occurs creating the SQLj connection context
Since:
WBI-SF 5.1