Improved: function parseBigDecimalForEntity is in wrong location

(OFBIZ-10689)

Missed those in previous commit

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850028 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2018-12-31 09:25:59 +00:00
parent b7f211729f
commit 25a47db54e
3 changed files with 4 additions and 4 deletions
@@ -175,7 +175,7 @@ public class PreferenceServices {
try {
if (UtilValidate.isNotEmpty(userPrefDataType)) {
userPrefValue = ObjectType.simpleTypeConvert(userPrefValue, userPrefDataType, null, null, false);
userPrefValue = ObjectType.simpleTypeOrObjectConvert(userPrefValue, userPrefDataType, null, null, false);
}
GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, userPrefTypeId, userPrefGroupTypeId, userPrefValue));
delegator.createOrStore(rec);
@@ -66,7 +66,7 @@ public final class PreferenceWorker {
// default to String
userPrefMap.put(rec.getString("userPrefTypeId"), rec.getString("userPrefValue"));
} else {
userPrefMap.put(rec.getString("userPrefTypeId"), ObjectType.simpleTypeConvert(rec.get("userPrefValue"), prefDataType, null, null, false));
userPrefMap.put(rec.getString("userPrefTypeId"), ObjectType.simpleTypeOrObjectConvert(rec.get("userPrefValue"), prefDataType, null, null, false));
}
return userPrefMap;
}
@@ -253,7 +253,7 @@ public final class PreferenceWorker {
* @return field map
*/
public static Map<String, Object> toFieldMap(String userLoginId, String userPrefTypeId, String userPrefGroupTypeId, Object userPrefValue) throws GeneralException {
Map<String, Object> fieldMap = UtilMisc.toMap("userLoginId", userLoginId, "userPrefTypeId", userPrefTypeId, "userPrefValue", ObjectType.simpleTypeConvert(userPrefValue, "String", null, null, false));
Map<String, Object> fieldMap = UtilMisc.toMap("userLoginId", userLoginId, "userPrefTypeId", userPrefTypeId, "userPrefValue", ObjectType.simpleTypeOrObjectConvert(userPrefValue, "String", null, null, false));
if (UtilValidate.isNotEmpty(userPrefGroupTypeId)) {
fieldMap.put("userPrefGroupTypeId", userPrefGroupTypeId);
}