preCollectionRemoveListener = new PreCollectionRemoveListener( this );
preCollectionUpdateListener = new PreCollectionUpdateListener( this );
postCollectionRecreateListener = new PostCollectionRecreateListener( this );
postCollectionRemoveListener = new PostCollectionRemoveListener( this );
postCollectionUpdateListener = new PostCollectionUpdateListener( this );
SessionFactoryImpl impl = ( SessionFactoryImpl ) sf;
impl.getEventListeners().setInitializeCollectionEventListeners(
new InitializeCollectionEventListener[] { initializeCollectionListener }
);
impl.getEventListeners().setPreCollectionRecreateEventListeners(
new PreCollectionRecreateEventListener[] { preCollectionRecreateListener }
);
impl.getEventListeners().setPostCollectionRecreateEventListeners(
new PostCollectionRecreateEventListener[] { postCollectionRecreateListener }
);
impl.getEventListeners().setPreCollectionRemoveEventListeners(
new PreCollectionRemoveEventListener[] { preCollectionRemoveListener }
);
impl.getEventListeners().setPostCollectionRemoveEventListeners(
new PostCollectionRemoveEventListener[] { postCollectionRemoveListener }
);
impl.getEventListeners().setPreCollectionUpdateEventListeners(
new PreCollectionUpdateEventListener[] { preCollectionUpdateListener }
);
impl.getEventListeners().setPostCollectionUpdateEventListeners(
new PostCollectionUpdateEventListener[] { postCollectionUpdateListener }
);
}