|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WSPushDownHelper
This interface provides helper methods that can be used by customers in their implementations of their <beanName>UserDefinedPushDownMethods classes.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
Method Summary | |
---|---|
javax.resource.cci.IndexedRecord |
createCCIIndexedRecord()
This method returns an empty IndexedRecord object that the caller will need to fill in with the appropriate data (which will be handled by the generated extractor). |
javax.resource.cci.Record |
createCCIRecord(java.lang.Object obj)
This method returns a CCI Record object containing the specified object. |
javax.resource.ResourceException |
createResourceException(java.lang.String message,
java.lang.Class c)
This method creates a ResourceException containing the specified message. |
javax.resource.ResourceException |
createResourceException(java.lang.Throwable t,
java.lang.Class c)
This method creates a ResourceException which chains the specified Throwable. |
void |
returnCCIIndexedRecord(javax.resource.cci.IndexedRecord record)
This method returns the specified IndexedRecord object to the cache. |
Field Detail |
---|
static final java.lang.String COPYRIGHT
Method Detail |
---|
javax.resource.ResourceException createResourceException(java.lang.Throwable t, java.lang.Class c)
This method creates a ResourceException which chains the specified Throwable.
Methods of UserDefinedPushDownMethodsImpl are only allowed to throw ResourceException. If users want to rethrow a particular exception which is not a ResourceException, they have to catch that exception, call this method to create a ResourceException object, and throw this ResourceException.
t
- a Throwable to be chained into the ResourceExceptionc
- the caller class. This is used to trace which
UserDefinedPushDownMethods implementation class throws the
ResourceException.
javax.resource.ResourceException createResourceException(java.lang.String message, java.lang.Class c)
This method creates a ResourceException containing the specified message. This is for cases where a ResourceException needs to be thrown from somewhere other than a catch block. For example, if the push down method returns an error return code instead of an exception, the user can translate this error code into meaningful text and use this ResourceException to return this message text.
Methods of UserDefinedPushDownMethodsImpl are only allowed to throw ResourceException. If users want to rethrow a particular exception which is not a ResourceException, they have to catch that exception, call this method to create a ResourceException object, and throw this ResourceException.
message
- the String that the ResourceException should containc
- the caller class. This is used to trace which
UserDefinedPushDownMethods implementation class throws the
ResourceException.
javax.resource.cci.Record createCCIRecord(java.lang.Object obj) throws javax.resource.ResourceException
This method returns a CCI Record object containing the specified object.
obj
- The object to be wrapped in the CCI Record. For a "finder"
pushdown method whose stored procedure returns a java.sql.ResultSet whose
rows are already of the required shape, this helper method should be used
to wrap that ResultSet in a CCI Record suitable for return from the
"finder" method. For a "data logic" pushdown method which returns an
Object, this helper method should be used to wrap the Object in a CCI
Record suitable for return. Note that the Object returned for a "data
logic" method cannot be a ResultSet or any other JDBC object which
becomes invalid when the JDBC Connection is closed, since for "data
logic" methods the Connection is closed prior to return to the calling
application.
javax.resource.ResourceException
- thrown if obj is nulljavax.resource.cci.IndexedRecord createCCIIndexedRecord() throws javax.resource.ResourceException
This method returns an empty IndexedRecord object that the caller will need to fill in with the appropriate data (which will be handled by the generated extractor). For "finder" pushdown methods whose backend function (stored procedure, CICS or IMS function, etc.) does not return a java.sql.ResultSet with the required shape, this helper method should be used to create the IndexedRecords which the finder code assembles into a "Record of Records" of the required shape.
"Data logic" methods should NOT use this helper method, they should instead use createCCIRecord(Object)
javax.resource.ResourceException
- thrown if an IndexedRecord could not be
created.void returnCCIIndexedRecord(javax.resource.cci.IndexedRecord record) throws javax.resource.ResourceException
This method returns the specified IndexedRecord object to the cache. Use this method only if you know that this IndexedRecord is no longer used and can be safely returned back to the cache and readied for future use.
record
- The CCI IndexedRecord to return to the cache
javax.resource.ResourceException
- thrown if the IndexedRecord could not be
returned to the cache.
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |