java.lang.Object
is.codion.framework.model.EntityEditEvents
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 TypeMethodDescriptionstatic voiddeleted(Collection<is.codion.framework.domain.entity.Entity> deletedEntities) Notifies deletestatic 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 voidinserted(Collection<is.codion.framework.domain.entity.Entity> insertedEntities) Notifies insertstatic 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 voidupdated(Map<is.codion.framework.domain.entity.Entity.Key, is.codion.framework.domain.entity.Entity> updatedEntities) Notifies updatestatic 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.
-
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
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
Notifies delete- Parameters:
deletedEntities- the deleted entities
-