if (parameterValues.containsKey(name)) {
Object value = parameterValues.get(name);
if (type != null) {
if (type instanceof JdbcSqlType) {
if (value == null)
<BUG>ps.setNull(ix + i, (Integer) ((JdbcSqlType) type).getDatabaseSqlType());
else</BUG>
((JdbcSqlType) type).set(ps, ix + i, value);
} else if (value == null) {
ps.setNull(ix + i, (Integer) type);

if (parameterValues.containsKey(name)) {
Object value = parameterValues.get(name);
if (type != null) {
if (type instanceof JdbcSqlType) {
if (value == null)
ps.setNull(ix + i, ((JdbcSqlType) type).getDatabaseSqlType());
else
((JdbcSqlType) type).set(ps, ix + i, value);
} else if (value == null) {
ps.setNull(ix + i, (Integer) type);
