protected int[] executeBatch(List<MockParameterMap> batchParams) throws SQLException
{
try
{
int[] results = new int[batchParams.size()];
SQLException exception = null;
for(int ii = 0; ii < results.length; ii++)
{
if(isQuery(getSQL()))
{
exception = prepareFailedResult(results, ii, "SQL " + getSQL() + " in the list of batches returned a ResultSet.", null);
}
else
{
try
{
MockParameterMap currentParameters = batchParams.get(ii);
results[ii] = executeUpdate(currentParameters);
}
catch(SQLException exc)
{
exception = prepareFailedResult(results, ii, null, exc);
}
}
if(null != exception && !resultSetHandler.getContinueProcessingOnBatchFailure())
{
throw exception;
}
}
if(null != exception)