- All Known Subinterfaces:
ForeignKeyEditorLink
Describes how a detail EntityEditor relates to a master editor for the purposes of
one-to-one entity composition.
An EditorLink is constructed via the builder() factory and registered with
a master editor through EntityEditor.DetailEditors.add(EditorLink).
Two flavors are supported:
ForeignKeyEditorLink— backed by aForeignKey. The framework supplies sensible defaults for loading and pre-insert linking from the foreign key, and manages the foreign key as an invisible-to-user-logic attribute on the detail editor (seeEntityEditor.DetailEditorsfor the framework-managed declarations). Created viabuilder().editor(detail).foreignKey(fk)...build().- Plain
EditorLink— backed by an arbitrary user-suppliedEditorLink.DetailCondition,EditorLink.DetailSelectorEditorLink.DetailEntity. No framework FK management is applied. Created viabuilder().editor(detail).name(n).condition(c)...build().
The link's load action — whichever EditorLink.DetailCondition, EditorLink.DetailSelect or
EditorLink.DetailEntity was supplied — is invoked on a background thread whenever the framework needs
to load the detail row: when the master's active entity changes and on
EntityEditor.EditorTasks.refresh(). Implementations should not touch UI-bound editor state
directly.
Presence — whether a detail row should currently exist — is observed via the detail editor's
EntityEditor.present() state; the link's builder configures that state at registration time
(see EditorLink.Builder.present(Predicate)).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder input describing how to prepare a detail entity prior to insertion, given the freshly-inserted master entity.static interfaceEditorLink.Builder<R extends EntityEditor<R>>Builds anEditorLink.static interfaceBuilder input describing theConditionused to load the detail row for a given master.static interfaceBuilder input describing how to load the detail entity for a given master — the lowest-level escape hatch when neither aEditorLink.DetailConditionnor aEditorLink.DetailSelectsuffices (e.g.static interfaceBuilder input describing theEntityConnection.Selectused to load the detail row for a given master. -
Method Summary
Static Methods
-
Method Details
-
builder
- Returns:
- a builder for constructing an
EditorLink
-