primaryKeyPresent
- Returns:
- an
ObservableStateindicating whether the value of the entity primary key is present
Observable<Entity>, Observer<Entity>EntityEditor<R extends EntityEditor<R>>Observer.Builder<T,B extends Observer.Builder<T,B>> changing()set(Entity),
defaults() or clear() — before any loading begins and before the detail
subtree is touched, allowing listeners to inspect the pre-change state of the entire
master/detail tree.voidclear()EntityEditor.EditorValue.persist() directive — the difference
from defaults(), which retains persistent values.voiddefaults()EntityEditor.EditorValue.persist().exists()get()modified()ObservableState indicating whether any values have been modified.present()voidrefresh()voidchanging() or
changed events; only replaced() fires.replaced()replace(Entity), when the editor is reset to defaults after a delete, or when this
editor is reset as a detail editor of a master being replaced, defaulted or cleared.voidrevert()voidvalid()changed, getOrThrow, getOrThrow, is, isNot, isNull, isNullable, optionaladdConsumer, addListener, addWeakConsumer, addWeakListener, observer, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener, when, whenget in interface Observable<Entity>Populates this editor entity with the values from the given entity, making it the active
entity. Use defaults() or clear() to reset the editor.
changing() fires synchronously, before any loading begins; throwing a
CancelException from a changing() listener cancels
the operation. Detail editors registered via EntityEditor.DetailEditors.add(EditorLink) are then
reloaded via their link's load action, and changed fires once the active
entity and the full detail subtree are in place. This is the master-selection path — use
replace(Entity) for silent post-persist refreshes that should not re-fire change events.
When the editor is bound to UI components the operation is performed asynchronously: this
method returns after changing() has fired but before changed, so
the active entity is not yet in place when it returns. Otherwise the operation is synchronous.
For master editors with registered detail editors the events are ordered bottom-up:
changing() fires before the detail subtree is touched; each detail editor is then set
(firing changed, never changing()); finally changed
fires on the master once every detail editor is in its post-set state. This makes
changed the "everything done" signal for the full master/detail tree,
suitable for actions that need to inspect aggregate state.
entity - the entity to setNullPointerException - in case the entity is nullIllegalArgumentException - in case the entity is not of the correct typeFires synchronously when the active entity is about to change via set(Entity),
defaults() or clear() — before any loading begins and before the detail
subtree is touched, allowing listeners to inspect the pre-change state of the entire
master/detail tree. The post-change counterpart is changed.
Throwing a CancelException from a listener cancels the
change. Note that replace(Entity) does not fire this event, nor do detail editors
when reset as part of a master operation.
Returns an observer notified each time the entity is silently replaced — via
replace(Entity), when the editor is reset to defaults after a delete, or when this
editor is reset as a detail editor of a master being replaced, defaulted or cleared. Unlike
changed, it is not preceded by changing().
For master editors with registered detail editors, this fires after the detail
subtree has been replaced — by the time listeners run, every detail editor is in its
post-persist state. This makes replaced() the "everything done" signal for the
full master/detail tree, suitable for actions that need to inspect aggregate state (e.g.,
focusing the first empty detail editor, or adjusting which detail editors are visible).
Silently replaces the editor entity values without firing changing() or
changed events; only replaced() fires.
If the new entity has the same primary key as the current one (the typical post-persist
refresh case), detail editors are not touched — their state is owned by their own
persist tasks. If the primary key changes, detail editors are reloaded via their link's load
action, since the master's identity has changed; as with set(Entity) that reload may
be performed asynchronously when the editor is bound to UI components, with replaced()
firing once the full detail subtree is in place.
entity - the replacement entityNullPointerException - in case the entity is nullIllegalArgumentException - in case the entity is not of the correct typeIllegalStateException - in case the active entity does not existResets this editor to its default values, retaining values flagged to
EntityEditor.EditorValue.persist(). Registered detail editors are reset to their defaults as well.
Fires changing() and then changed on this editor; throwing a
CancelException from a changing() listener cancels the
operation.Detail editors are reset silently, firing only replaced().
Clears all values, disregarding the EntityEditor.EditorValue.persist() directive — the difference
from defaults(), which retains persistent values. Registered detail editors are cleared
as well.
Fires changing() and then changed on this editor; throwing a
CancelException from a changing() listener cancels the
operation. Detail editors are cleared silently, firing only replaced().
ObservableState indicating whether the entity exists in the databaseReturns an ObservableState indicating whether any values have been modified.
Note that only existing entities are modified, new, or non-existing entities are never modified.
ObservableState indicating the modified state of this editor entityEntityEditor.Present instanceObservableState indicating whether the value of the entity primary key is presentObservableState indicating the valid status of the underlying Entity.