Package org.hibernate.event.spi
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.
-
ClassDescriptionDefines a base class for events involving collections.Abstract supertype of
AbstractPostDatabaseOperationEvent
andAbstractPostDatabaseOperationEvent
.Defines a base class forSession
-generated events.Represents an operation successfully executed by the database.Represents an operation that is about to be executed by the database.Event class forautomatic
stateful session flush.Defines the contract for handling of session auto-flush events.Event class forSession.clear()
.Listener for notification ofSession.clear()
ADeleteEvent
represents a delete operation applied to a single entity.Event class forSession.remove(java.lang.Object)
.Defines the contract for handling of deletion events generated from a session.Event class forSession.isDirty()
.Defines the contract for handling of session dirty-check events.An observer for detection of multiple entity representations for a persistent entity being merged.Composite for the things related to Hibernate's event system.Callback forEventEngineContributor
Integration contract for contributing event types and listeners to the Hibernate event system.Deprecated, for removal: This API element is subject to removal in a future version.EventType<T>Enumeration of the recognized types of events, including meta-information about each.Event class forSession.evict(java.lang.Object)
andSession.detach(java.lang.Object)
.Defines the contract for handling of evict events generated from a session.Event class for stateful session flush.Defines the contract for handling of session flush events.Deprecated, for removal: This API element is subject to removal in a future version.RenamedDiagnosticEvent
.An event that occurs when a collection wants to be initializedDefines the contract for handling of collection initialization events generated by a session.Defines an event class for the loading of an entity.Defines the contract for handling of load events generated from a session.Event class forSession.lock(java.lang.Object, org.hibernate.LockMode)
.Defines the contract for handling of lock events generated from a session.MergeContext
is a specializedMap
implementation used by a merge event listener to keep track of each entity being merged and its corresponding managed result.Event class forSession.merge(T)
.Defines the contract for handling of merge events generated from a session.APersistEvent
represents a persist operation applied to a single entity.Event class forSession.persist(java.lang.Object)
.Defines the contract for handling of create events generated from a session.An event that occurs after a collection is recreatedCalled after recreating a collectionAn event that occurs after a collection is removedCalled after removing a collectionAn event that occurs after a collection is updatedCalled after updating a collectionCalled after an entity delete is committed to the datastore.Called after an entity insert is committed to the datastore.Called after an entity update is committed to the datastore.Occurs after deleting an item from the datastoreCalled after deleting an item from the datastoreOccurs after inserting an item in the datastoreCalled after inserting an item in the datastoreOccurs after an entity instance is fully loaded.Occurs after an entity instance is fully loaded.Occurs after the datastore is updatedCalled after updating the datastoreOccurs after the datastore is updated via a SQLmerge
Called after updating the datastoreAn event that occurs before a collection is recreatedCalled before recreating a collectionAn event that occurs before a collection is removedCalled before removing a collectionAn event that occurs before a collection is updatedCalled before updating a collectionRepresents apre-delete
event, which occurs just prior to performing the deletion of an entity from the database.Called before deleting an item from the datastoreRepresents apre-insert
event, which occurs just prior to performing the insert of an entity into the database.Called before inserting an item in the datastoreCalled before injecting property values into a newly loaded entity instance.Called before injecting property values into a newly loaded entity instance.Represents apre-update
event, which occurs just prior to performing the update of an entity in the database.Called before updating the datastoreRepresents a pre-upsert event, which occurs just prior to performing the upsert of an entity in the database.Called before updating the datastoreARefreshEvent
represents a refresh operation applied to a single entity.Event class forSession.refresh(java.lang.Object)
.Defines the contract for handling of refresh events generated from a session.Event class forSession.replicate(java.lang.Object, org.hibernate.ReplicationMode)
.Deprecated.sinceSession.replicate(java.lang.Object, org.hibernate.ReplicationMode)
is deprecated
EventMonitor
.