Interface ModelLink.Builder<B extends ModelLink.Builder<B>>

Type Parameters:
B - the builder type
All Known Subinterfaces:
ForeignKeyModelLink.Builder<B>
Enclosing interface:
ModelLink

public static interface ModelLink.Builder<B extends ModelLink.Builder<B>>
Builds a ModelLink
  • Method Details

    • onSelection

      B onSelection(Consumer<Collection<Entity>> onSelection)
      Note that only active model links respond to parent model selection by default.
      Parameters:
      onSelection - called when the selection changes in the parent model
      Returns:
      this builder
    • onInsert

      B onInsert(Consumer<Collection<Entity>> onInsert)
      Parameters:
      onInsert - called when an insert is performed in the parent model
      Returns:
      this builder
    • onUpdate

      B onUpdate(Consumer<Map<Entity,Entity>> onUpdate)
      Parameters:
      onUpdate - called when an update is performed in the parent model
      Returns:
      this builder
    • onDelete

      B onDelete(Consumer<Collection<Entity>> onDelete)
      Parameters:
      onDelete - called when delete is performed in the parent model
      Returns:
      this builder
    • active

      B active(boolean active)
      Parameters:
      active - the initial active state of this link
      Returns:
      this builder
    • build

      ModelLink build()
      Returns:
      a ModelLink