Code example for Timestamp

Methods: setTime

0
			insertOrUpdateOrderDetail(root.getJSONArray("orderDetailRows"));
 
			// Rows deletion 
			deleteOldRows(root.getJSONArray("deletedRows"));
 
			timestamp.setTime(root.getLong("timestamp"));
			return root.getString("message");
		} catch (JSONException e) {
			e.printStackTrace();
			return "JSON Parsing Error"; 
		} 
	} 
 
	private void deleteOldRows(JSONArray rows) throws JSONException {
		DBAdapter dbAdapter = new DBAdapter(ctx);
		dbAdapter.open();
		for (int i = 0; i < rows.length(); i++) {
			JSONObject row = rows.getJSONObject(i);
			dbAdapter.deleteRow(row.getString("table"), row.getLong("row_id"));
		} 
	}