(boolean getRemain)
| 393 | } |
| 394 | |
| 395 | private List<OEDataRow> search_read(boolean getRemain) { |
| 396 | List<OEDataRow> rows = new ArrayList<OEDataRow>(); |
| 397 | try { |
| 398 | OEFieldsHelper fields = new OEFieldsHelper( |
| 399 | mDatabase.getDatabaseServerColumns()); |
| 400 | JSONObject domain = null; |
| 401 | if (getRemain) |
| 402 | domain = getLocalIdsDomain("not in").get(); |
| 403 | JSONObject result = mOdoo.search_read(mDatabase.getModelName(), |
| 404 | fields.get(), domain, 0, 100, null, null); |
| 405 | for (int i = 0; i < result.getJSONArray("records").length(); i++) { |
| 406 | JSONObject record = result.getJSONArray("records") |
| 407 | .getJSONObject(i); |
| 408 | OEDataRow row = new OEDataRow(); |
| 409 | row.put("id", record.getInt("id")); |
| 410 | for (OEColumn col : mDatabase.getDatabaseServerColumns()) { |
| 411 | row.put(col.getName(), record.get(col.getName())); |
| 412 | } |
| 413 | rows.add(row); |
| 414 | } |
| 415 | } catch (Exception e) { |
| 416 | e.printStackTrace(); |
| 417 | } |
| 418 | return rows; |
| 419 | } |
| 420 | |
| 421 | public List<OEDataRow> search_read() { |
| 422 | Log.d(TAG, "OEHelper->search_read()"); |
no test coverage detected