Search in sources :

Example 1 with InitializeCollectionEventListener

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

the class SessionImpl method initializeCollection.

@Override
public void initializeCollection(PersistentCollection<?> collection, boolean writing) {
    checkOpenOrWaitingForAutoClose();
    pulseTransactionCoordinator();
    InitializeCollectionEvent event = new InitializeCollectionEvent(collection, this);
    fastSessionServices.eventListenerGroup_INIT_COLLECTION.fireEventOnEachListener(event, InitializeCollectionEventListener::onInitializeCollection);
    delayedAfterCompletion();
}
Also used : InitializeCollectionEventListener(org.hibernate.event.spi.InitializeCollectionEventListener) InitializeCollectionEvent(org.hibernate.event.spi.InitializeCollectionEvent)

Example 2 with InitializeCollectionEventListener

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

the class SessionImpl method initializeCollection.

@Override
public void initializeCollection(PersistentCollection collection, boolean writing) {
    checkOpenOrWaitingForAutoClose();
    checkTransactionSynchStatus();
    InitializeCollectionEvent event = new InitializeCollectionEvent(collection, this);
    for (InitializeCollectionEventListener listener : listeners(EventType.INIT_COLLECTION)) {
        listener.onInitializeCollection(event);
    }
    delayedAfterCompletion();
}
Also used : InitializeCollectionEventListener(org.hibernate.event.spi.InitializeCollectionEventListener) InitializeCollectionEvent(org.hibernate.event.spi.InitializeCollectionEvent)

Aggregations

InitializeCollectionEvent (org.hibernate.event.spi.InitializeCollectionEvent)2 InitializeCollectionEventListener (org.hibernate.event.spi.InitializeCollectionEventListener)2