net.wgen.op.db.dbunit
Class CallExecutorDBUnit

java.lang.Object
  extended bynet.wgen.op.db.dbunit.CallExecutorDBUnit
All Implemented Interfaces:
CallExecutor

public class CallExecutorDBUnit
extends java.lang.Object
implements CallExecutor

Executes DatabaseCalls using XML-backed capture files to supply the data.

Version:
$Id: CallExecutorDBUnit.html,v 1.2 2007/01/28 04:09:36 paulfeuer Exp $
Author:
Paul Feuer, Wireless Generation, Inc.

Field Summary
private  TraceKey _traceKey
           
static java.lang.String CONTEXT_TAG
           
 
Constructor Summary
CallExecutorDBUnit(TraceKey traceKey)
           
 
Method Summary
 void executeDatabaseCall(DatabaseCall dbCall)
          Executes an operation described by the DatabaseCall and registers that operations output in the appropriate registers in the DatabaseCall.
 void executeOp(Op op)
          Executes an Op.
 java.util.Collection executeQueryWithResultSet(DatabaseCall dbCall)
          Executes an operation described by the DatabaseCall and returns the List representing the data returned by the PreparedStatement in the ResultSet.
 void executeUpdate(DatabaseCall dbCall)
          Not implemented, but won't throw an exception.
protected  DatabaseCallException makeDatabaseCallException(DatabaseCall dbCall, java.lang.Exception ex)
          Make a DatabaseCallException out of an exception.
private  void processPostCallOptions(DatabaseCall dbCall)
          Called at the end of the finally statement to process any options that should be evaluated after everything is called.
private  void processPreCallOptions(DatabaseCall dbCall)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_TAG

public static final java.lang.String CONTEXT_TAG
See Also:
Constant Field Values

_traceKey

private final TraceKey _traceKey
Constructor Detail

CallExecutorDBUnit

public CallExecutorDBUnit(TraceKey traceKey)
Method Detail

executeOp

public void executeOp(Op op)
               throws OpException
Executes an Op.

Specified by:
executeOp in interface CallExecutor
Parameters:
op -
Throws:
OpException

executeDatabaseCall

public void executeDatabaseCall(DatabaseCall dbCall)
                         throws DatabaseCallException
Executes an operation described by the DatabaseCall and registers that operations output in the appropriate registers in the DatabaseCall.

Specified by:
executeDatabaseCall in interface CallExecutor
Parameters:
dbCall - the object describing the operation to be performed
Throws:
DatabaseCallException

executeQueryWithResultSet

public java.util.Collection executeQueryWithResultSet(DatabaseCall dbCall)
                                               throws DatabaseCallException
Executes an operation described by the DatabaseCall and returns the List representing the data returned by the PreparedStatement in the ResultSet.

Specified by:
executeQueryWithResultSet in interface CallExecutor
Parameters:
dbCall - the object describing the operation to be run
Returns:
the list representing the returned data
Throws:
DatabaseCallException

executeUpdate

public void executeUpdate(DatabaseCall dbCall)
                   throws DatabaseCallException
Not implemented, but won't throw an exception.

Specified by:
executeUpdate in interface CallExecutor
Parameters:
dbCall -
Throws:
DatabaseCallException

makeDatabaseCallException

protected DatabaseCallException makeDatabaseCallException(DatabaseCall dbCall,
                                                          java.lang.Exception ex)
Make a DatabaseCallException out of an exception.

Parameters:
dbCall - the statement being executed when the error was encountered
ex - the exception that occurred
Returns:
the exception to be thrown

processPostCallOptions

private void processPostCallOptions(DatabaseCall dbCall)
Called at the end of the finally statement to process any options that should be evaluated after everything is called.

Parameters:
dbCall - the call being finished

processPreCallOptions

private void processPreCallOptions(DatabaseCall dbCall)
Parameters:
dbCall -