List of usage examples for org.apache.cordova LOG w
public static void w(String tag, String s, Object... args)
From source file:com.msopentech.o365.outlookServices.OutlookServicesMethodsImpl.java
License:Open Source License
/** * Updates fetcher object with oData query params, specified in queryObject JSON * * @param fetcher Fetcher object to update * @param queryObject JSONObject that contains query parameters: * top: int,/*from w ww .ja v a 2 s . c o m*/ * skip: int, * select: String, * expand: String, * filter: String */ static void updateFetcherWithQuery(ODataCollectionFetcher fetcher, JSONObject queryObject) { try { int top = queryObject.getInt("top"); int skip = queryObject.getInt("skip"); String select = queryObject.getString("select"); select = select.equals("null") ? null : select; String expand = queryObject.getString("expand"); expand = expand.equals("null") ? null : expand; String filter = queryObject.getString("filter"); filter = filter.equals("null") ? null : filter; if (top > -1) { fetcher.top(top); } if (skip > -1) { fetcher.skip(skip); } if (select != null) { fetcher.select(select); } if (expand != null) { fetcher.expand(expand); } if (filter != null) { fetcher.filter(filter); } } catch (JSONException ignored) { LOG.w(TAG, "Failed to parse query parameters", ignored); fetcher.reset(); } }