ResultMap resultMap;
if (mapping.getResultMapName() == null) {
resultMap = statementScope.getResultMap();
handleOutputParameterResults(statementScope, resultMap, rs, callback);
} else {
SqlMapClientImpl client = (SqlMapClientImpl) statementScope.getSession().getSqlMapClient();
resultMap = client.getDelegate().getResultMap(mapping.getResultMapName());
DefaultRowHandler rowHandler = new DefaultRowHandler();
RowHandlerCallback handlerCallback = new RowHandlerCallback(resultMap, null, rowHandler);
handleOutputParameterResults(statementScope, resultMap, rs, handlerCallback);
parameters[i] = rowHandler.getList();
}