public ContentValues getValues() { ContentValues v = new ContentValues(); if (id != 0) { v.put(ID, id); } v.put(ACCOUNT_ID, accountID); v.put(SERVICE_PROVIDER, identifier.getProvider()); v.put(SERVICE_ID, identifier.getAccountNumber()); v.put(UPDATED, lastUpdate == null ? -1L : lastUpdate.getTime()); v.put(STATUS, updateStatus.ordinal()); JSONObject obj = new JSONObject(); try { writeTo(obj); } catch (JSONException e) { throw new IllegalArgumentException("Error JSON processing"); } v.put(DATA, obj.toString()); return v; }