@Test public void setSearchCondition() throws Exception { NCMBPush push = new NCMBPush(); NCMBQuery<NCMBInstallation> query = new NCMBQuery<>("installation"); query.whereGreaterThan("score", 80); push.setSearchCondition(query); NCMBException error = null; try { push.send(); } catch (NCMBException e) { error = e; } Assert.assertNull(error); Assert.assertEquals(80, push.getSearchCondition().getJSONObject("score").getInt("$gt")); DateFormat format = NCMBDateFormat.getIso8601(); Assert.assertEquals(format.parse("2014-06-03T11:28:30.348Z"), push.getCreateDate()); Assert.assertEquals(format.parse("2014-06-03T11:28:30.348Z"), push.getUpdateDate()); }
public void setSearchCondition(NCMBQuery<NCMBInstallation> query) { try { JSONObject whereConditions = query.getConditions(); JSONObject value = new JSONObject(); if (whereConditions.has("where")) { value = whereConditions.getJSONObject("where"); } mFields.put("searchCondition", value); mUpdateKeys.add("searchCondition"); } catch (JSONException error) { throw new IllegalArgumentException(error.getMessage()); } }
NCMBPush extends NCMBBase { public void setSearchCondition(NCMBQuery<NCMBInstallation> query) { try { JSONObject whereConditions = query.getConditions(); JSONObject value = new JSONObject(); if (whereConditions.has("where")) { value = whereConditions.getJSONObject("where"); } mFields.put("searchCondition", value); mUpdateKeys.add("searchCondition"); } catch (JSONException error) { throw new IllegalArgumentException(error.getMessage()); } } }
NCMBPush extends NCMBBase { public void setSearchCondition(NCMBQuery<NCMBInstallation> query) { try { JSONObject whereConditions = query.getConditions(); JSONObject value = new JSONObject(); if (whereConditions.has("where")) { value = whereConditions.getJSONObject("where"); } mFields.put("searchCondition", value); mUpdateKeys.add("searchCondition"); } catch (JSONException error) { throw new IllegalArgumentException(error.getMessage()); } } NCMBPush();   NCMBPush(JSONObject params); }
NCMBPush extends NCMBBase { public void setSearchCondition(NCMBQuery<NCMBInstallation> query) { try { JSONObject whereConditions = query.getConditions(); JSONObject value = new JSONObject(); if (whereConditions.has("where")) { value = whereConditions.getJSONObject("where"); } mFields.put("searchCondition", value); mUpdateKeys.add("searchCondition"); } catch (JSONException error) { throw new IllegalArgumentException(error.getMessage()); } } NCMBPush();   NCMBPush(JSONObject params); Date getDeliveryTime(); JSONArray getTarget(); JSONObject getSearchCondition(); String getMessage(); JSONObject getUserSettingValue(); Date getDeliveryExpirationDate(); String getDeliveryExpirationTime(); int getDeliveryPlanNumber(); int getDeliveryNumber(); int getStatus(); JSONObject getError(); String getAction(); Boolean getBadgeIncrementFlag(); String getSound(); Boolean getContentAvailable(); String getTitle(); Boolean getDialog(); String getRichUrl(); int getBadgeSetting(); String getCategory(); void setDeliveryTime(Date value); void setTarget(JSONArray value); void setSearchCondition(NCMBQuery<NCMBInstallation> query); void setMessage(String value); void setUserSettingValue(JSONObject value); void setDeliveryExpirationDate(Date value); void setDeliveryExpirationTime(String value); void setAction(String value); void setBadgeIncrementFlag(Boolean value); void setSound(String value); void setContentAvailable(Boolean value); void setTitle(String value); void setDialog(Boolean value); void setRichUrl(String value); void setBadgeSetting(Integer value); void setCategory(String value); static NCMBQuery<NCMBPush> getQuery(); void send(); void sendInBackground(); void sendInBackground(final DoneCallback callback); void fetch(); void fetchInBackground(); void fetchInBackground(final FetchCallback callback); void delete(); void deleteInBackground(); void deleteInBackground(final DoneCallback callback); static void richPushHandler(Context context, Intent intent); static void trackAppOpened(Intent intent); static void dialogPushHandler(Context context, Bundle bundle, NCMBDialogPushConfiguration dialogPushConfiguration); }
NCMBPush extends NCMBBase { public void setSearchCondition(NCMBQuery<NCMBInstallation> query) { try { JSONObject whereConditions = query.getConditions(); JSONObject value = new JSONObject(); if (whereConditions.has("where")) { value = whereConditions.getJSONObject("where"); } mFields.put("searchCondition", value); mUpdateKeys.add("searchCondition"); } catch (JSONException error) { throw new IllegalArgumentException(error.getMessage()); } } NCMBPush();   NCMBPush(JSONObject params); Date getDeliveryTime(); JSONArray getTarget(); JSONObject getSearchCondition(); String getMessage(); JSONObject getUserSettingValue(); Date getDeliveryExpirationDate(); String getDeliveryExpirationTime(); int getDeliveryPlanNumber(); int getDeliveryNumber(); int getStatus(); JSONObject getError(); String getAction(); Boolean getBadgeIncrementFlag(); String getSound(); Boolean getContentAvailable(); String getTitle(); Boolean getDialog(); String getRichUrl(); int getBadgeSetting(); String getCategory(); void setDeliveryTime(Date value); void setTarget(JSONArray value); void setSearchCondition(NCMBQuery<NCMBInstallation> query); void setMessage(String value); void setUserSettingValue(JSONObject value); void setDeliveryExpirationDate(Date value); void setDeliveryExpirationTime(String value); void setAction(String value); void setBadgeIncrementFlag(Boolean value); void setSound(String value); void setContentAvailable(Boolean value); void setTitle(String value); void setDialog(Boolean value); void setRichUrl(String value); void setBadgeSetting(Integer value); void setCategory(String value); static NCMBQuery<NCMBPush> getQuery(); void send(); void sendInBackground(); void sendInBackground(final DoneCallback callback); void fetch(); void fetchInBackground(); void fetchInBackground(final FetchCallback callback); void delete(); void deleteInBackground(); void deleteInBackground(final DoneCallback callback); static void richPushHandler(Context context, Intent intent); static void trackAppOpened(Intent intent); static void dialogPushHandler(Context context, Bundle bundle, NCMBDialogPushConfiguration dialogPushConfiguration);  }