Class EntityEditEvents

java.lang.Object
is.codion.framework.model.EntityEditEvents

public final class EntityEditEvents extends Object
A central event hub for listening for entity inserts, updates and deletes. EntityEditModel uses this to post its events.
See Also:
  • Method Details

    • insertObserver

      public static Observer<Collection<Entity>> insertObserver(EntityType entityType)
      Returns an insert observer, notified each time entities of the given type are inserted.
      Parameters:
      entityType - the type of entity to listen for
      Returns:
      the insert observer for the given entity type
    • updateObserver

      public static Observer<Map<Entity.Key,Entity>> updateObserver(EntityType entityType)
      Returns an update observer, notified each time entities of the given type are updated.
      Parameters:
      entityType - the type of entity to listen for
      Returns:
      the update observer for the given entity type
    • deleteObserver

      public static Observer<Collection<Entity>> deleteObserver(EntityType entityType)
      Returns a delete observer, notified each time entities of the given type are deleted.
      Parameters:
      entityType - the type of entity to listen for
      Returns:
      the delete observer for the given entity type
    • inserted

      public static void inserted(Collection<Entity> insertedEntities)
      Notifies insert
      Parameters:
      insertedEntities - the inserted entities
    • updated

      public static void updated(Map<Entity.Key,Entity> updatedEntities)
      Notifies update
      Parameters:
      updatedEntities - the updated entities mapped to their original primary key
    • deleted

      public static void deleted(Collection<Entity> deletedEntities)
      Notifies delete
      Parameters:
      deletedEntities - the deleted entities