Object states & modes
Object states
Each object has one of three states at a time:
clean
: The object hasn't changed since its last persistence. This is also the state an object has immediately after its retrieval from a repository.dirty
: Each significant change (at least one property has to effectively change its value) will force the object intodirty
state (at least, see below). The object needs to be persisted.mutated
: If one of the object's content properties gets altered, the object is forced intomutated
state which will also trigger draft mode (see below).
The object content consists of
- the Meta properties,
- the Domain properties and
- the object payload (if any).
Object modes
Each object has one of two modes at a time:
published
: An object is in published mode when it has been explicitly published (resulting in thesystem.published
property being set to a timestamp) and there hasn't occured any content change since then.draft
: As soon as a content change occurs (see above), the object automatically falls into draft mode. Thesystem.published
property gets unset, persisting the object will result in a new object revision. The draft mode can also be triggered explicitly.