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 Summary

    Modifier and Type
    Method
    Description
    static void
    deleted(Collection<is.codion.framework.domain.entity.Entity> deletedEntities)
    Notifies delete
    static is.codion.common.observer.Observer<Collection<is.codion.framework.domain.entity.Entity>>
    deleteObserver(is.codion.framework.domain.entity.EntityType entityType)
    Returns a delete observer, notified each time entities of the given type are deleted.
    static void
    inserted(Collection<is.codion.framework.domain.entity.Entity> insertedEntities)
    Notifies insert
    static is.codion.common.observer.Observer<Collection<is.codion.framework.domain.entity.Entity>>
    insertObserver(is.codion.framework.domain.entity.EntityType entityType)
    Returns an insert observer, notified each time entities of the given type are inserted.
    static void
    updated(Map<is.codion.framework.domain.entity.Entity.Key,is.codion.framework.domain.entity.Entity> updatedEntities)
    Notifies update
    static is.codion.common.observer.Observer<Map<is.codion.framework.domain.entity.Entity.Key,is.codion.framework.domain.entity.Entity>>
    updateObserver(is.codion.framework.domain.entity.EntityType entityType)
    Returns an update observer, notified each time entities of the given type are updated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • insertObserver

      public static is.codion.common.observer.Observer<Collection<is.codion.framework.domain.entity.Entity>> insertObserver(is.codion.framework.domain.entity.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 is.codion.common.observer.Observer<Map<is.codion.framework.domain.entity.Entity.Key,is.codion.framework.domain.entity.Entity>> updateObserver(is.codion.framework.domain.entity.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 is.codion.common.observer.Observer<Collection<is.codion.framework.domain.entity.Entity>> deleteObserver(is.codion.framework.domain.entity.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<is.codion.framework.domain.entity.Entity> insertedEntities)
      Notifies insert
      Parameters:
      insertedEntities - the inserted entities
    • updated

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

      public static void deleted(Collection<is.codion.framework.domain.entity.Entity> deletedEntities)
      Notifies delete
      Parameters:
      deletedEntities - the deleted entities