Package org.hibernate.event.spi
Defines the event types and event listener interfaces for
events produced by the stateful
Session
.
An event represents a request by the session API for some work to be performed, and an event listener must respond to the event and do that work, usually by scheduling some sort of action.
Note that a StatelessSession
does not
produce events and does not make use of this framework.
- API Note:
- The framework for event notifications defined in this
package is intended for use by extremely sophisticated
libraries and frameworks which extend Hibernate, and
by the internal implementation of Hibernate itself.
Regular application code should prefer the use of JPA-defined lifecycle callback methods, that is,
@PostPersist
and friends, or an implementation of the venerableInterceptor
interface.
-
Interface Summary Interface Description AutoFlushEventListener Defines the contract for handling of session auto-flush events.ClearEventListener Listener for notification ofSession.clear()
DeleteContext ADeleteEvent
represents a delete operation applied to a single entity.DeleteEventListener Defines the contract for handling of deletion events generated from a session.DirtyCheckEventListener Defines the contract for handling of session dirty-check events.EntityCopyObserver An observer for detection of multiple entity representations for a persistent entity being merged.EntityCopyObserverFactory EventEngineContributions Callback forEventEngineContributor
EventEngineContributor Integration contract for contributing event types and listeners to the Hibernate event system.EventManager EventSource EvictEventListener Defines the contract for handling of evict events generated from a session.FlushEntityEventListener FlushEventListener Defines the contract for handling of session flush events.HibernateMonitoringEvent InitializeCollectionEventListener Defines the contract for handling of collection initialization events generated by a session.LoadEventListener Defines the contract for handling of load events generated from a session.LockEventListener Defines the contract for handling of lock events generated from a session.MergeEventListener Defines the contract for handling of merge events generated from a session.PersistContext APersistEvent
represents a persist operation applied to a single entity.PersistEventListener Defines the contract for handling of create events generated from a session.PostCollectionRecreateEventListener Called after recreating a collectionPostCollectionRemoveEventListener Called after removing a collectionPostCollectionUpdateEventListener Called after updating a collectionPostCommitDeleteEventListener Called after an entity delete is committed to the datastore.PostCommitInsertEventListener Called after an entity insert is committed to the datastore.PostCommitUpdateEventListener Called after an entity update is committed to the datastore.PostDeleteEventListener Called after deleting an item from the datastorePostInsertEventListener Called after inserting an item in the datastorePostLoadEventListener Occurs after an entity instance is fully loaded.PostUpdateEventListener Called after updating the datastorePreCollectionRecreateEventListener Called before recreating a collectionPreCollectionRemoveEventListener Called before removing a collectionPreCollectionUpdateEventListener Called before updating a collectionPreDeleteEventListener Called before deleting an item from the datastorePreInsertEventListener Called before inserting an item in the datastorePreLoadEventListener Called before injecting property values into a newly loaded entity instance.PreUpdateEventListener Called before updating the datastoreRefreshContext ARefreshEvent
represents a refresh operation applied to a single entity.RefreshEventListener Defines the contract for handling of refresh events generated from a session.ReplicateEventListener Deprecated. sinceSession.replicate(java.lang.Object, org.hibernate.ReplicationMode)
is deprecatedResolveNaturalIdEventListener Defines the contract for handling of resolve natural id events generated from a session.SaveOrUpdateEventListener Deprecated. sinceSession.saveOrUpdate(java.lang.Object)
and friends are deprecated -
Class Summary Class Description AbstractCollectionEvent Defines a base class for events involving collections.AbstractEvent Defines a base class forSession
-generated events.AbstractPreDatabaseOperationEvent Represents an operation we are about to perform against the database.AutoFlushEvent Defines an event class for the auto-flushing of a session.ClearEvent An event forSession.clear()
listeningDeleteEvent Defines an event class for the deletion of an entity.DirtyCheckEvent Defines an event class for the dirty-checking of a session.EventEngine Composite for the things related to Hibernate's event system.EventType<T> Enumeration of the recognized types of events, including meta-information about each.EvictEvent Defines an event class for the evicting of an entity.FlushEntityEvent FlushEvent Defines an event class for the flushing of a session.InitializeCollectionEvent An event that occurs when a collection wants to be initializedLoadEvent Defines an event class for the loading of an entity.LoadEventListener.LoadType LockEvent Defines an event class for the locking of an entity.MergeContext MergeContext
is a specializedMap
implementation used by a merge event listener to keep track of each entity being merged and its corresponding managed result.MergeEvent An event class for merge() and saveOrUpdateCopy()PersistEvent An event class for persist()PostCollectionRecreateEvent An event that occurs after a collection is recreatedPostCollectionRemoveEvent An event that occurs after a collection is removedPostCollectionUpdateEvent An event that occurs after a collection is updatedPostDeleteEvent Occurs after deleting an item from the datastorePostInsertEvent Occurs after inserting an item in the datastorePostLoadEvent Occurs after an entity instance is fully loaded.PostUpdateEvent Occurs after the datastore is updatedPreCollectionRecreateEvent An event that occurs before a collection is recreatedPreCollectionRemoveEvent An event that occurs before a collection is removedPreCollectionUpdateEvent An event that occurs before a collection is updatedPreDeleteEvent Represents apre-delete
event, which occurs just prior to performing the deletion of an entity from the database.PreInsertEvent Represents apre-insert
event, which occurs just prior to performing the insert of an entity into the database.PreLoadEvent Called before injecting property values into a newly loaded entity instance.PreUpdateEvent Represents apre-update
event, which occurs just prior to performing the update of an entity in the database.RefreshEvent Defines an event class for the refreshing of an object.ReplicateEvent Defines an event class for the replication of an entity.ResolveNaturalIdEvent Defines an event class for the resolving of an entity id from the entity's natural-idSaveOrUpdateEvent An event class for saveOrUpdate() -
Enum Summary Enum Description EventManager.CacheActionDescription