mozilla-services/android-sync — comment on commit a2cf475ff697343ed34b34bcc3d35839c5a36162
File: src/main/java/org/mozilla/gecko/sync/repositories/domain/Record.java line 252
By rnewman:

They're not being abstracted and overridden; they have a clear and well-defined domain meaning (reflected in the `deleted` flag in the JSON form on the server), which is — and is required to be — shared between every record type. The assumptions encoded in this method are simply the assumptions of the Sync record domain.

That is, there's only one notion of "deletion" in the system, and it's Sync's. In fact, that deletion handling is being lifted into this method in `Record` is evidence of it being shared and fundamental. The `populatePayload` methods that the `Record` subclasses override don't need to consider deletion at all.

Note that we can allow types of records for which deletion is a meaningless concept (and thus `deleted` is always `false`), but we don't need to add a method — it's a fixed field that's set when the record is instantiated from a storage layer.

(I would like to reach a world in which `Record` really is an immutable object. Nearly there…)