} else {
vars.errorCtx.setMoreInfo("Check the parameter mapping property type or name.");
handler = resolveTypeHandler(vars.client.getDelegate().getTypeHandlerFactory(), vars.currentParameterMap.getParameterClass(), propertyName, javaType, jdbcType);
}
BasicParameterMapping mapping = new BasicParameterMapping();
mapping.setPropertyName(propertyName);
mapping.setJdbcTypeName(jdbcType);
mapping.setTypeName(type);
mapping.setResultMapName( resultMap );
mapping.setNullValue(nullValue);
if (mode != null && mode.length() > 0) {
mapping.setMode(mode);
}
mapping.setTypeHandler(handler);
try {
if (javaType != null && javaType.length() > 0) {
mapping.setJavaType(Resources.classForName(javaType));
}
} catch (ClassNotFoundException e) {
throw new RuntimeException("Error setting javaType on parameter mapping. Cause: " + e);
}
if (numericScale != null) {
try {
Integer scale = Integer.valueOf(numericScale);
if (scale.intValue() < 0) {
throw new RuntimeException("Error setting numericScale on parameter mapping. Cause: scale must be greater than or equal to zero");
}
mapping.setNumericScale(scale);
} catch (NumberFormatException e) {
throw new RuntimeException("Error setting numericScale on parameter mapping. Cause: " + numericScale + " is not a valid integer");
}
}