Interface DetailModelLink<M extends EntityModel<M,E,T>,E extends EntityEditModel,T extends EntityTableModel<E>>

Type Parameters:
M - the EntityModel type
E - the EntityEditModel type
T - the EntityTableModel type
All Known Subinterfaces:
ForeignKeyDetailModelLink<M,E,T>
All Known Implementing Classes:
DefaultDetailModelLink, DefaultForeignKeyDetailModelLink, SwingDetailModelLink, SwingForeignKeyDetailModelLink

public interface DetailModelLink<M extends EntityModel<M,E,T>,E extends EntityEditModel,T extends EntityTableModel<E>>
Represents a link between a master and detail model.
  • Method Summary

    Modifier and Type
    Method
    Description
    Controls the active status of this link.
     
    default void
    onDelete(Collection<Entity> deletedEntities)
    Called when delete is performed in the master model, regardless of entity type.
    default void
    onInsert(Collection<Entity> insertedEntities)
    Called when a insert is performed in the master model, regardless of entity type.
    default void
    onSelection(Collection<Entity> selectedEntities)
    Called when the selection changes in the master model
    default void
    onUpdate(Map<Entity.Key,Entity> updatedEntities)
    Called when an update is performed in the master model, regardless of entity type.
  • Method Details

    • detailModel

      M detailModel()
      Returns:
      the detail model
    • active

      State active()
      Controls the active status of this link. Active detail model links update and filter the detail model according to the entity/entities selected in the master model.
      Returns:
      the State controlling the active status of this detail model link
    • onSelection

      default void onSelection(Collection<Entity> selectedEntities)
      Called when the selection changes in the master model
      Parameters:
      selectedEntities - the selected master entities
    • onInsert

      default void onInsert(Collection<Entity> insertedEntities)
      Called when a insert is performed in the master model, regardless of entity type.
      Parameters:
      insertedEntities - the inserted entities
    • onUpdate

      default void onUpdate(Map<Entity.Key,Entity> updatedEntities)
      Called when an update is performed in the master model, regardless of entity type.
      Parameters:
      updatedEntities - the updated entities, mapped to their original primary keys
    • onDelete

      default void onDelete(Collection<Entity> deletedEntities)
      Called when delete is performed in the master model, regardless of entity type.
      Parameters:
      deletedEntities - the deleted entities