net.wgen.op.db
Class CallOutputHandler
java.lang.Object
net.wgen.op.db.CallOutputHandler
- public class CallOutputHandler
- extends java.lang.Object
Retrieves and possibly transforms register outputs and returned ResultSets.
- Version:
- $Id: CallOutputHandler.html,v 1.2 2007/01/28 04:09:36 paulfeuer Exp $
- Author:
- Paul Feuer, Wireless Generation, Inc.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_databaseCall
private DatabaseCall _databaseCall
_statement
private java.sql.PreparedStatement _statement
_amountOfWork
private java.lang.StringBuffer _amountOfWork
_capture
private DBUnitCapture _capture
CallOutputHandler
public CallOutputHandler(DatabaseCall dbCall,
java.sql.PreparedStatement callableStatement)
retrieveAndRegisterOutputs
public final void retrieveAndRegisterOutputs()
throws java.sql.SQLException,
DatabaseCallException,
java.io.IOException
- Throws:
java.sql.SQLException
DatabaseCallException
java.io.IOException
transformOutput
public java.lang.Object transformOutput(int idx,
Parameter parameter,
java.lang.Object valueFromStatement)
throws java.sql.SQLException,
DatabaseCallException
- Retrieves the specified output from the CallableStatement and possibly transforms
it if the object is a sql array or cursor.
- Parameters:
idx - the index of the value for tracking and capture purposesparameter - the container of the object and any options for processingvalueFromStatement - the value as it was obtained from the CallableStatement
- Returns:
- the returned object, possibly transformed
- Throws:
java.sql.SQLException
DatabaseCallException
translateResultSetToCollection
protected java.util.List translateResultSetToCollection(java.sql.ResultSet resultSet,
Parameter parameter,
int paramIdx)
- Transforms the ResultSet using a ResultSetTransformer.
- Parameters:
resultSet - the resultSet to transformparameter - paramIdx -
- Returns:
- the transformed resultSet - a List of Maps
- See Also:
ResultSetTransformer
translateSqlArrayToJava
protected java.util.List translateSqlArrayToJava(int paramIdx,
Parameter parameter,
java.sql.Array sqlArray)
throws java.sql.SQLException
- Helper method that translates a SQL Array into a Java List.
- Parameters:
paramIdx - parameter - sqlArray -
- Returns:
- List of Object[] with row results
- Throws:
java.sql.SQLException - if a database error occurs
SuspectPerformanceException- See Also:
HandlingOption.processCallback(Object, String, DatabaseCall, Parameter, int, HandlingOption)
getAmountOfWork
public java.lang.String getAmountOfWork()