com.mockrunner.jdbc
Class AbstractOutParameterResultSetHandler

java.lang.Object
  extended bycom.mockrunner.jdbc.AbstractResultSetHandler
      extended bycom.mockrunner.jdbc.AbstractParameterResultSetHandler
          extended bycom.mockrunner.jdbc.AbstractOutParameterResultSetHandler
Direct Known Subclasses:
CallableStatementResultSetHandler

public abstract class AbstractOutParameterResultSetHandler
extends AbstractParameterResultSetHandler

Abstract base class for all statement types that support out parameters, i.e. CallableStatement.


Constructor Summary
AbstractOutParameterResultSetHandler()
           
 
Method Summary
 void clearOutParameter()
          Clears the out parameters.
 java.util.Map getGlobalOutParameter()
          Returns the global out parameter Map.
 java.util.Map getOutParameter(java.lang.String sql)
          Returns the first out parameter Map that matches the specified SQL string.
 java.util.Map getOutParameter(java.lang.String sql, java.util.Map parameters)
          Returns the first out parameter Map that matches the specified SQL string and the specified parameters.
 void prepareGlobalOutParameter(java.util.Map outParameters)
          Prepares the global out parameter Map.
 void prepareOutParameter(java.lang.String sql, java.util.Map outParameters)
          Prepare an out parameter Map for a specified SQL string.
 void prepareOutParameter(java.lang.String sql, java.util.Map outParameters, java.util.List parameters)
          Prepare an out parameter Map for a specified SQL string and the specified parameters.
 void prepareOutParameter(java.lang.String sql, java.util.Map outParameters, java.util.Map parameters)
          Prepare an out parameter Map for a specified SQL string and the specified parameters.
 void prepareOutParameter(java.lang.String sql, java.util.Map outParameters, java.lang.Object[] parameters)
          Prepare an out parameter Map for a specified SQL string and the specified parameters.
 
Methods inherited from class com.mockrunner.jdbc.AbstractParameterResultSetHandler
addParameterMapForExecutedStatement, clearResultSets, clearThrowsSQLException, clearUpdateCounts, doParameterMatch, getExecutedStatementParameter, getParametersForExecutedStatement, getResultSet, getThrowsSQLException, getUpdateCount, prepareResultSet, prepareResultSet, prepareResultSet, prepareThrowsSQLException, prepareThrowsSQLException, prepareThrowsSQLException, prepareUpdateCount, prepareUpdateCount, prepareUpdateCount, setExactMatchParameter
 
Methods inherited from class com.mockrunner.jdbc.AbstractResultSetHandler
addExecutedStatement, addReturnedResultSet, clearGlobalResultSet, clearReturnsResultSet, createResultSet, createResultSet, createResultSet, createResultSet, getCaseSensitive, getExactMatch, getExecutedStatements, getGlobalResultSet, getGlobalUpdateCount, getResultSet, getResultSetMap, getReturnedResultSets, getReturnsResultSet, getThrowsSQLException, getUpdateCount, getUpdateCountMap, getUseRegularExpressions, prepareGlobalResultSet, prepareGlobalUpdateCount, prepareResultSet, prepareReturnsResultSet, prepareThrowsSQLException, prepareUpdateCount, setCaseSensitive, setExactMatch, setUseRegularExpressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOutParameterResultSetHandler

public AbstractOutParameterResultSetHandler()
Method Detail

getOutParameter

public java.util.Map getOutParameter(java.lang.String sql)
Returns the first out parameter Map that matches the specified SQL string. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive(boolean), AbstractResultSetHandler.setExactMatch(boolean) and AbstractResultSetHandler.setUseRegularExpressions(boolean).

Parameters:
sql - the SQL string
Returns:
the corresponding out parameter Map

getOutParameter

public java.util.Map getOutParameter(java.lang.String sql,
                                     java.util.Map parameters)
Returns the first out parameter Map that matches the specified SQL string and the specified parameters. PPlease note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive(boolean), AbstractResultSetHandler.setExactMatch(boolean) and AbstractResultSetHandler.setUseRegularExpressions(boolean) and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean).

Parameters:
sql - the SQL string
parameters - the parameters
Returns:
the corresponding out parameter Map

clearOutParameter

public void clearOutParameter()
Clears the out parameters.


getGlobalOutParameter

public java.util.Map getGlobalOutParameter()
Returns the global out parameter Map. The statement takes the global global out parameter Map if no out parameter Map can be found for the current SQL string.

Returns:
the global out parameter Map

prepareGlobalOutParameter

public void prepareGlobalOutParameter(java.util.Map outParameters)
Prepares the global out parameter Map. The statement takes the global global out parameter Map if no out parameter Map can be found for the current SQL string.

Parameters:
outParameters - the global out parameter Map

prepareOutParameter

public void prepareOutParameter(java.lang.String sql,
                                java.util.Map outParameters)
Prepare an out parameter Map for a specified SQL string. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive(boolean), AbstractResultSetHandler.setExactMatch(boolean) and AbstractResultSetHandler.setUseRegularExpressions(boolean).

Parameters:
sql - the SQL string
outParameters - the out parameter Map

prepareOutParameter

public void prepareOutParameter(java.lang.String sql,
                                java.util.Map outParameters,
                                java.lang.Object[] parameters)
Prepare an out parameter Map for a specified SQL string and the specified parameters. The specified parameters array must contain the parameters in the correct order starting with 0 as the first parameter. Please keep in mind that parameters in CallableStatement objects start with 1 as the first parameter. So parameters[0] maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive(boolean), AbstractResultSetHandler.setExactMatch(boolean) and AbstractResultSetHandler.setUseRegularExpressions(boolean) and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean).

Parameters:
sql - the SQL string
outParameters - the corresponding out parameter Map
parameters - the parameters

prepareOutParameter

public void prepareOutParameter(java.lang.String sql,
                                java.util.Map outParameters,
                                java.util.List parameters)
Prepare an out parameter Map for a specified SQL string and the specified parameters. The specified parameters array must contain the parameters in the correct order starting with 0 as the first parameter. Please keep in mind that parameters in CallableStatement objects start with 1 as the first parameter. So parameters.get(0) maps to the parameter with index 1. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive(boolean), AbstractResultSetHandler.setExactMatch(boolean) and AbstractResultSetHandler.setUseRegularExpressions(boolean) and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean).

Parameters:
sql - the SQL string
outParameters - the corresponding out parameter Map
parameters - the parameters

prepareOutParameter

public void prepareOutParameter(java.lang.String sql,
                                java.util.Map outParameters,
                                java.util.Map parameters)
Prepare an out parameter Map for a specified SQL string and the specified parameters. The specified parameters Map must contain the parameters by mapping Integer or String objects to the corresponding parameter. An Integer object is the index of the parameter. A String is the name of the parameter. Please note that you can modify the match parameters with AbstractResultSetHandler.setCaseSensitive(boolean), AbstractResultSetHandler.setExactMatch(boolean) and AbstractResultSetHandler.setUseRegularExpressions(boolean) and the match parameters for the specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean).

Parameters:
sql - the SQL string
outParameters - the corresponding out parameter Map
parameters - the parameters