Interface EntityEditor.Present

All Superinterfaces:
ObservableState, Observer<Boolean>
Enclosing interface:
EntityEditor<R extends EntityEditor<R>>

public static interface EntityEditor.Present extends ObservableState

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.

  • Method Details

    • predicate

      Value<Predicate<Entity>> 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 Value controlling the present predicate