@Test public void update_object_non_update_value() throws Exception { NCMBObject obj = new NCMBObject("TestClass"); obj.setObjectId("updateTestObjectId"); obj.save(); SimpleDateFormat df = NCMBDateFormat.getIso8601(); Assert.assertTrue(obj.getUpdateDate().equals(df.parse("2014-06-04T11:28:30.348Z"))); }
public void save() throws NCMBException { NCMBObjectService objService = (NCMBObjectService) NCMB.factory(NCMB.ServiceType.OBJECT); JSONObject res = null; if (getObjectId() == null){ res = objService.saveObject(mClassName, mFields); } else { JSONObject updateJson = null; try { updateJson = createUpdateJsonData(); } catch (JSONException e) { throw new IllegalArgumentException(e.getMessage()); } res = objService.updateObject(mClassName, getObjectId(), updateJson); } setServerDataToProperties(res); mUpdateKeys.clear(); }
NCMBObject extends NCMBBase { public void save() throws NCMBException { NCMBObjectService objService = (NCMBObjectService) NCMB.factory(NCMB.ServiceType.OBJECT); JSONObject res = null; if (getObjectId() == null){ res = objService.saveObject(mClassName, mFields); } else { JSONObject updateJson = null; try { updateJson = createUpdateJsonData(); } catch (JSONException e) { throw new IllegalArgumentException(e.getMessage()); } res = objService.updateObject(mClassName, getObjectId(), updateJson); } setServerDataToProperties(res); mUpdateKeys.clear(); } }
NCMBObject extends NCMBBase { public void save() throws NCMBException { NCMBObjectService objService = (NCMBObjectService) NCMB.factory(NCMB.ServiceType.OBJECT); JSONObject res = null; if (getObjectId() == null){ res = objService.saveObject(mClassName, mFields); } else { JSONObject updateJson = null; try { updateJson = createUpdateJsonData(); } catch (JSONException e) { throw new IllegalArgumentException(e.getMessage()); } res = objService.updateObject(mClassName, getObjectId(), updateJson); } setServerDataToProperties(res); mUpdateKeys.clear(); } NCMBObject(String className);   NCMBObject(String className, JSONObject params); }
NCMBObject extends NCMBBase { public void save() throws NCMBException { NCMBObjectService objService = (NCMBObjectService) NCMB.factory(NCMB.ServiceType.OBJECT); JSONObject res = null; if (getObjectId() == null){ res = objService.saveObject(mClassName, mFields); } else { JSONObject updateJson = null; try { updateJson = createUpdateJsonData(); } catch (JSONException e) { throw new IllegalArgumentException(e.getMessage()); } res = objService.updateObject(mClassName, getObjectId(), updateJson); } setServerDataToProperties(res); mUpdateKeys.clear(); } NCMBObject(String className);   NCMBObject(String className, JSONObject params); void save(); void saveInBackground(final DoneCallback callback); void fetch(); void fetchInBackground(); void fetchInBackground(final FetchCallback callback); void deleteObject(); void deleteObjectInBackground(final DoneCallback callback); void increment(String key, int amount); void addToList(String key, List objects); void addUniqueToList(String key, List objects); void removeFromList(String key, List objects); }
NCMBObject extends NCMBBase { public void save() throws NCMBException { NCMBObjectService objService = (NCMBObjectService) NCMB.factory(NCMB.ServiceType.OBJECT); JSONObject res = null; if (getObjectId() == null){ res = objService.saveObject(mClassName, mFields); } else { JSONObject updateJson = null; try { updateJson = createUpdateJsonData(); } catch (JSONException e) { throw new IllegalArgumentException(e.getMessage()); } res = objService.updateObject(mClassName, getObjectId(), updateJson); } setServerDataToProperties(res); mUpdateKeys.clear(); } NCMBObject(String className);   NCMBObject(String className, JSONObject params); void save(); void saveInBackground(final DoneCallback callback); void fetch(); void fetchInBackground(); void fetchInBackground(final FetchCallback callback); void deleteObject(); void deleteObjectInBackground(final DoneCallback callback); void increment(String key, int amount); void addToList(String key, List objects); void addUniqueToList(String key, List objects); void removeFromList(String key, List objects);  }