Package org.hibernate.envers.event.spi
Class BaseEnversCollectionEventListener
java.lang.Object
org.hibernate.envers.event.spi.BaseEnversEventListener
org.hibernate.envers.event.spi.BaseEnversCollectionEventListener
- All Implemented Interfaces:
EnversListener
- Direct Known Subclasses:
EnversPostCollectionRecreateEventListenerImpl
,EnversPreCollectionRemoveEventListenerImpl
,EnversPreCollectionUpdateEventListenerImpl
Base class for Envers' collection event related listeners
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseEnversCollectionEventListener
(EnversService enversService) -
Method Summary
Modifier and TypeMethodDescriptionprotected final CollectionEntry
protected Serializable
Forces persistent collection initialization.protected final void
onCollectionAction
(AbstractCollectionEvent event, PersistentCollection newColl, Serializable oldColl, CollectionEntry collectionEntry) protected final void
onCollectionActionInversed
(AbstractCollectionEvent event, PersistentCollection newColl, Serializable oldColl, CollectionEntry collectionEntry) protected boolean
Checks whether modification of not-owned relation field triggers new revision and owner entity is versioned.Methods inherited from class org.hibernate.envers.event.spi.BaseEnversEventListener
checkIfTransactionInProgress, generateBidirectionalCollectionChangeWorkUnits, getEnversService
-
Constructor Details
-
BaseEnversCollectionEventListener
-
-
Method Details
-
getCollectionEntry
-
onCollectionAction
protected final void onCollectionAction(AbstractCollectionEvent event, PersistentCollection newColl, Serializable oldColl, CollectionEntry collectionEntry) -
onCollectionActionInversed
protected final void onCollectionActionInversed(AbstractCollectionEvent event, PersistentCollection newColl, Serializable oldColl, CollectionEntry collectionEntry) -
initializeCollection
Forces persistent collection initialization.- Parameters:
event
- Collection event.- Returns:
- Stored snapshot.
-
shouldGenerateRevision
Checks whether modification of not-owned relation field triggers new revision and owner entity is versioned.- Parameters:
event
- Collection event.- Returns:
true
if revision based on given event should be generated,false
otherwise.
-