Interface EditorLink.Builder<R extends EntityEditor<R>>

Type Parameters:
R - the EntityEditor type
All Known Subinterfaces:
ForeignKeyEditorLink.Builder<R>
Enclosing interface:
EditorLink

public static interface EditorLink.Builder<R extends EntityEditor<R>>
  • Method Details

    • present

      EditorLink.Builder<R> present(Predicate<Entity> present)

      Sets the presence predicate for the detail editor.

      At registration time (EntityEditor.DetailEditors.add(EditorLink)) the supplied predicate is installed on the detail editor's EntityEditor.present() state, replacing any previously-set predicate (it is not wrapped). The predicate is then locked: subsequent attempts to replace it via EntityEditor.Present.predicate() will fail. If a custom presence predicate is needed on a detail editor, supply it here rather than setting it directly on the editor before registration.

      Parameters:
      present - the presence predicate
      Returns:
      this builder
    • beforeInsert

      EditorLink.Builder<R> beforeInsert(EditorLink.BeforeInsert beforeInsert)

      Overrides the EditorLink.BeforeInsert action.

      For FK-based links this overrides the default FK-set; the user must still ensure the foreign key gets set correctly if the framework's default is replaced.

      Parameters:
      beforeInsert - the action applied to the detail prior to insertion
      Returns:
      this builder
    • caption

      EditorLink.Builder<R> caption(String caption)

      Sets the link caption.

      The caption is the human-readable label used by the UI layer when disambiguating components — for example, the suffix in the "Select input field" dialog when the same attribute appears in multiple slots ("Tag (1)", "Tag (Manager)").

      Defaults to the link name. Override when the link name is a structural identifier (e.g., the auto-derived foreignKey.name() or sequential numbers used to keep slot names unique) and a different label reads better in the UI.

      Parameters:
      caption - the link caption
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if the caption is null or empty
    • build

      EditorLink build()
      Returns:
      a new EditorLink