Search in sources :

Example 1 with PreCollectionUpdateEventListener

use of org.hibernate.event.spi.PreCollectionUpdateEventListener in project hibernate-orm by hibernate.

the class CollectionUpdateAction method preUpdate.

private void preUpdate() {
    final EventListenerGroup<PreCollectionUpdateEventListener> listenerGroup = listenerGroup(EventType.PRE_COLLECTION_UPDATE);
    if (listenerGroup.isEmpty()) {
        return;
    }
    final PreCollectionUpdateEvent event = new PreCollectionUpdateEvent(getPersister(), getCollection(), eventSource());
    for (PreCollectionUpdateEventListener listener : listenerGroup.listeners()) {
        listener.onPreUpdateCollection(event);
    }
}
Also used : PreCollectionUpdateEvent(org.hibernate.event.spi.PreCollectionUpdateEvent) PreCollectionUpdateEventListener(org.hibernate.event.spi.PreCollectionUpdateEventListener)

Example 2 with PreCollectionUpdateEventListener

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

the class ReactiveCollectionUpdateAction method preUpdate.

private void preUpdate() {
    final EventListenerGroup<PreCollectionUpdateEventListener> listenerGroup = listenerGroup(EventType.PRE_COLLECTION_UPDATE);
    if (listenerGroup.isEmpty()) {
        return;
    }
    final PreCollectionUpdateEvent event = new PreCollectionUpdateEvent(getPersister(), getCollection(), eventSource());
    for (PreCollectionUpdateEventListener listener : listenerGroup.listeners()) {
        listener.onPreUpdateCollection(event);
    }
}
Also used : PreCollectionUpdateEvent(org.hibernate.event.spi.PreCollectionUpdateEvent) PreCollectionUpdateEventListener(org.hibernate.event.spi.PreCollectionUpdateEventListener)

Aggregations

PreCollectionUpdateEvent (org.hibernate.event.spi.PreCollectionUpdateEvent)2 PreCollectionUpdateEventListener (org.hibernate.event.spi.PreCollectionUpdateEventListener)2