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:
+1
-1
@@ -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);
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user