pardom/ActiveAndroid — pull request #103 by markuspfeiffer (2013-08-08 20:01:35+00:00)
Title: Added hooks for save and delete, allow simple change tracking

Added two hooks onSaved() and onDeleted(), to allow derived classes to do something useful after being either saved or deleted (e.g. trigger an update of the UI), since save() and delete() methods are final.

Also added methods that allow derived classes to do a simple form of change tracking. A derived class can use markAsChanged() to track if it was changed, the flag is reset once the model is saved. For example, this can be used to only invoke save() on a model if isChanged() returns true.