- All Superinterfaces:
ObservableState,Observer<Boolean>
- Enclosing interface:
EntityEditor<R extends EntityEditor<R>>
Indicates whether an entity is present, according to the predicate specified via
predicate(). Presence answers the question "should a row for this entity currently
exist in the database?" and is reactive — it re-evaluates whenever the underlying entity
value changes.
For standalone editors the predicate defaults to "always present" and is freely settable.
For editors registered as a detail editor via EntityEditor.DetailEditors.add(EditorLink), the
predicate is supplied through EditorLink.Builder.present(Predicate) at registration
time and locked thereafter — subsequent attempts to replace it via predicate() will
fail.
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.reactive.observer.Observer
Observer.Builder<T,B extends Observer.Builder<T, B>> -
Method Summary
Methods inherited from interface is.codion.common.reactive.state.ObservableState
is, not, observerMethods inherited from interface is.codion.common.reactive.observer.Observer
addConsumer, addListener, addWeakConsumer, addWeakListener, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener, when, when
-
Method Details
-
predicate
Controls the predicate used to evaluate presence.
For detail editors the predicate is set by the link builder at registration time and cannot be replaced afterwards; supply the predicate via
EditorLink.Builder.present(Predicate)instead.- Returns:
- a
Valuecontrolling the present predicate
-