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.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
Observable.changed() events; only replaced() fires.replaced()replace(Entity), Unlike Observable.changed(), it is not preceded by changing().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. The active entity itself is then applied synchronously, after which detail editors
registered via EntityEditor.DetailEditors.add(EditorLink) are reloaded via their link's load action,
with Observable.changed() firing once the full detail subtree is in place.
Use replace(Entity) for silent post-persist refreshes that should not re-fire change events.
The active entity is applied synchronously, so get() reflects the new values as soon
as this method returns. When the editor is bound to UI components only the detail editors are
loaded asynchronously, on a background thread; the method then returns before the detail subtree
is in place and before Observable.changed() fires. Otherwise the operation is fully
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 Observable.changed(), never changing()); finally Observable.changed()
fires on the master once every detail editor is in its post-set state. This makes
Observable.changed() the "everything done" signal for the full master/detail tree.
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. The post-change counterpart is Observable.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), Unlike Observable.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.
Silently replaces the editor entity values without firing changing() or
Observable.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 — and the replacement is fully synchronous. If the primary key changes, detail
editors are reloaded via their link's load action, since the master's identity has changed; the
entity values are applied synchronously, while as with set(Entity) that detail 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 Observable.changed() on this editor; throwing a
CancelException from a changing() listener cancels the
operation. Detail editors are reset silently, firing only replaced(). This is an
in-memory reset and is always performed synchronously, even when the editor is bound to UI components.
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 Observable.changed() on this editor; throwing a
CancelException from a changing() listener cancels the
operation. Detail editors are cleared silently, firing only replaced(). Like
defaults(), this is an in-memory reset and is always performed synchronously.
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.