List of usage examples for org.json JSONArray getInt
public int getInt(int index) throws JSONException
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getCategoriesCount(long groupId, long excludedCategoryId, long parentCategoryId, int status) throws Exception { JSONObject _command = new JSONObject(); try {//from w w w . j a v a 2 s . com JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("excludedCategoryId", excludedCategoryId); _params.put("parentCategoryId", parentCategoryId); _params.put("status", status); _command.put("/mbcategory/get-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getCategoriesCount(long groupId, long parentCategoryId) throws Exception { JSONObject _command = new JSONObject(); try {//from www. j a v a 2 s .co m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("parentCategoryId", parentCategoryId); _command.put("/mbcategory/get-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getCategoriesCount(long groupId, JSONArray excludedCategoryIds, JSONArray parentCategoryIds, int status) throws Exception { JSONObject _command = new JSONObject(); try {//w ww . j a va 2 s. co m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("excludedCategoryIds", checkNull(excludedCategoryIds)); _params.put("parentCategoryIds", checkNull(parentCategoryIds)); _params.put("status", status); _command.put("/mbcategory/get-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getCategoriesCount(long groupId, JSONArray parentCategoryIds, int status) throws Exception { JSONObject _command = new JSONObject(); try {/*from www.j ava 2 s . co m*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("parentCategoryIds", checkNull(parentCategoryIds)); _params.put("status", status); _command.put("/mbcategory/get-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getCategoriesCount(long groupId, JSONArray parentCategoryIds) throws Exception { JSONObject _command = new JSONObject(); try {/*ww w . ja va 2s . c om*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("parentCategoryIds", checkNull(parentCategoryIds)); _command.put("/mbcategory/get-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getCategoriesAndThreadsCount(long groupId, long categoryId) throws Exception { JSONObject _command = new JSONObject(); try {/* www . j a v a 2 s . c om*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("categoryId", categoryId); _command.put("/mbcategory/get-categories-and-threads-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getCategoriesAndThreadsCount(long groupId, long categoryId, int status) throws Exception { JSONObject _command = new JSONObject(); try {// w w w . j a va2s . c o m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("categoryId", categoryId); _params.put("status", status); _command.put("/mbcategory/get-categories-and-threads-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbcategory.MBCategoryService.java
public Integer getSubscribedCategoriesCount(long groupId, long userId) throws Exception { JSONObject _command = new JSONObject(); try {//w ww. ja v a 2s. co m JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("userId", userId); _command.put("/mbcategory/get-subscribed-categories-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbmessage.MBMessageService.java
public Integer getGroupMessagesCount(long groupId, int status) throws Exception { JSONObject _command = new JSONObject(); try {/* w w w .j a va 2 s.c om*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("status", status); _command.put("/mbmessage/get-group-messages-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }
From source file:com.liferay.mobile.android.v7.mbmessage.MBMessageService.java
public Integer getThreadMessagesCount(long groupId, long categoryId, long threadId, int status) throws Exception { JSONObject _command = new JSONObject(); try {/*w w w . j av a 2s . com*/ JSONObject _params = new JSONObject(); _params.put("groupId", groupId); _params.put("categoryId", categoryId); _params.put("threadId", threadId); _params.put("status", status); _command.put("/mbmessage/get-thread-messages-count", _params); } catch (JSONException _je) { throw new Exception(_je); } JSONArray _result = session.invoke(_command); if (_result == null) { return null; } return _result.getInt(0); }