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
ConstructorsModifierConstructorDescriptionprotectedBaseEnversCollectionEventListener(EnversService enversService) -
Method Summary
Modifier and TypeMethodDescriptionprotected final org.hibernate.engine.spi.CollectionEntrygetCollectionEntry(org.hibernate.event.spi.AbstractCollectionEvent event) protected SerializableinitializeCollection(org.hibernate.event.spi.AbstractCollectionEvent event) Forces persistent collection initialization.protected final voidonCollectionAction(org.hibernate.event.spi.AbstractCollectionEvent event, org.hibernate.collection.spi.PersistentCollection newColl, Serializable oldColl, org.hibernate.engine.spi.CollectionEntry collectionEntry) protected final voidonCollectionActionInversed(org.hibernate.event.spi.AbstractCollectionEvent event, org.hibernate.collection.spi.PersistentCollection newColl, Serializable oldColl, org.hibernate.engine.spi.CollectionEntry collectionEntry) protected booleanshouldGenerateRevision(org.hibernate.event.spi.AbstractCollectionEvent event) 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
protected final org.hibernate.engine.spi.CollectionEntry getCollectionEntry(org.hibernate.event.spi.AbstractCollectionEvent event) -
onCollectionAction
protected final void onCollectionAction(org.hibernate.event.spi.AbstractCollectionEvent event, org.hibernate.collection.spi.PersistentCollection newColl, Serializable oldColl, org.hibernate.engine.spi.CollectionEntry collectionEntry) -
onCollectionActionInversed
protected final void onCollectionActionInversed(org.hibernate.event.spi.AbstractCollectionEvent event, org.hibernate.collection.spi.PersistentCollection newColl, Serializable oldColl, org.hibernate.engine.spi.CollectionEntry collectionEntry) -
initializeCollection
Forces persistent collection initialization.- Parameters:
event- Collection event.- Returns:
- Stored snapshot.
-
shouldGenerateRevision
protected boolean shouldGenerateRevision(org.hibernate.event.spi.AbstractCollectionEvent event) Checks whether modification of not-owned relation field triggers new revision and owner entity is versioned.- Parameters:
event- Collection event.- Returns:
trueif revision based on given event should be generated,falseotherwise.
-