+ /**
+ * Notify that this element has unsaved changes, and notify its parent of
+ * the same if any.
+ */
+ protected void setDirty() {
+ this.dirty = true;
+ if (this.parent != null)
+ this.parent.setDirty();
+ }
+
+ /**
+ * Notify this element <i>and all its descendants</i> that it is in pristine
+ * state (as opposed to dirty).
+ */
+ void setPristine() {
+ dirty = false;
+ for (TypeInfo type : types) {
+ // TODO ?
+ }
+ }
+
+ void setParent(Contact parent) {