com.mockrunner.jdbc
Class ParameterSets

java.lang.Object
  extended by com.mockrunner.jdbc.ParameterSets

public class ParameterSets
extends java.lang.Object

Encapsulates the parameter sets for an executed MockPreparedStatement or MockCallableStatement. If the prepared statement is executed multiple times, this class contains multiple maps with the corresponding parameters. Each execute call creates a parameter set. A parameter set is a map, the index or the name of the parameter maps to the value.


Constructor Summary
ParameterSets(java.lang.String sql)
           
 
Method Summary
 void addParameterSet(java.util.Map parameterSet)
          Adds a parameter set.
 int getNumberParameterSets()
          Get the current number of parameter sets.
 java.util.Map getParameterSet(int indexOfParameterSet)
          Gets a parameter set for a specified index.
 java.lang.String getSQLStatement()
          Get the SQL string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterSets

public ParameterSets(java.lang.String sql)
Method Detail

getSQLStatement

public java.lang.String getSQLStatement()
Get the SQL string.

Returns:
the SQL string

addParameterSet

public void addParameterSet(java.util.Map parameterSet)
Adds a parameter set.

Parameters:
parameterSet - the parameter set.

getNumberParameterSets

public int getNumberParameterSets()
Get the current number of parameter sets.

Returns:
the number of parameter sets

getParameterSet

public java.util.Map getParameterSet(int indexOfParameterSet)
Gets a parameter set for a specified index.

Parameters:
indexOfParameterSet - the index
Returns:
the parameter set