int index = 0;
if ( ( ( PersistentCollection ) parent.getChildren() ).wasInitialized() ) {
checkResult( listeners, listeners.getInitializeCollectionListener(), parent, index++ );
}
if ( oldChild instanceof ChildWithBidirectionalManyToMany ) {
ChildWithBidirectionalManyToMany oldChildWithManyToMany = ( ChildWithBidirectionalManyToMany ) oldChild;
if ( ( ( PersistentCollection ) oldChildWithManyToMany.getParents() ).wasInitialized() ) {
checkResult( listeners, listeners.getInitializeCollectionListener(), oldChildWithManyToMany, index++ );
}
}
checkResult( listeners, listeners.getPreCollectionUpdateListener(), parent, index++ );
checkResult( listeners, listeners.getPostCollectionUpdateListener(), parent, index++ );