Map paramsToUse = (parameters != null ? parameters : Collections.EMPTY_MAP);
int declaredInParameters = 0;
Iterator it = this.declaredParameters.iterator();
while (it.hasNext()) {
SqlParameter param = (SqlParameter) it.next();
if (param.isInputValueProvided()) {
if (!supportsLobParameters() &&
(param.getSqlType() == Types.BLOB || param.getSqlType() == Types.CLOB)) {
throw new InvalidDataAccessApiUsageException(
"BLOB or CLOB parameters are not allowed for this kind of operation");
}
if (param.getName() != null && !paramsToUse.containsKey(param.getName())) {
throw new InvalidDataAccessApiUsageException("The parameter named '" + param.getName() +
"' was not among the parameters supplied: " + paramsToUse.keySet());
}
declaredInParameters++;
}
}