下面列出了怎么用org.hibernate.event.spi.InitializeCollectionEventListener的API类实例代码及写法,或者点击链接到github查看源代码。
@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();
}