Search in sources :

Example 6 with PreCollectionRemoveEvent

use of org.hibernate.event.spi.PreCollectionRemoveEvent in project hibernate-reactive by hibernate.

the class ReactiveCollectionRemoveAction method preRemove.

private void preRemove() {
    final EventListenerGroup<PreCollectionRemoveEventListener> listenerGroup = listenerGroup(EventType.PRE_COLLECTION_REMOVE);
    if (listenerGroup.isEmpty()) {
        return;
    }
    final PreCollectionRemoveEvent event = new PreCollectionRemoveEvent(getPersister(), getCollection(), eventSource(), affectedOwner);
    for (PreCollectionRemoveEventListener listener : listenerGroup.listeners()) {
        listener.onPreRemoveCollection(event);
    }
}
Also used : PreCollectionRemoveEventListener(org.hibernate.event.spi.PreCollectionRemoveEventListener) PreCollectionRemoveEvent(org.hibernate.event.spi.PreCollectionRemoveEvent)

Aggregations

PreCollectionRemoveEvent (org.hibernate.event.spi.PreCollectionRemoveEvent)6 AbstractCollectionEvent (org.hibernate.event.spi.AbstractCollectionEvent)4 PostCollectionRecreateEvent (org.hibernate.event.spi.PostCollectionRecreateEvent)4 PreCollectionUpdateEvent (org.hibernate.event.spi.PreCollectionUpdateEvent)4 Serializable (java.io.Serializable)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 PreCollectionRemoveEventListener (org.hibernate.event.spi.PreCollectionRemoveEventListener)2