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.Defines a base class for
Session
-generated events.Represents an operation we are about to perform against the database.Defines an event class for the auto-flushing of a session.Defines the contract for handling of session auto-flush events.An event forSession.clear()
listeningListener for notification ofSession.clear()
ADeleteEvent
represents a delete operation applied to a single entity.Defines an event class for the deletion of an entity.Defines the contract for handling of deletion events generated from a session.Defines an event class for the dirty-checking of a session.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.Defines a contract for reporting and monitoring low-level events involving interactions between the session and the database or second-level cache.EventType<T>Enumeration of the recognized types of events, including meta-information about each.Defines an event class for the evicting of an entity.Defines the contract for handling of evict events generated from a session.Defines an event class for the flushing of a session.Defines the contract for handling of session flush events.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.Defines an event class for the locking of an entity.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.An event class for merge() and saveOrUpdateCopy()Defines the contract for handling of merge events generated from a session.APersistEvent
represents a persist operation applied to a single entity.An event class for persist()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 updatedCalled 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.Defines an event class for the refreshing of an object.Defines the contract for handling of refresh events generated from a session.Defines an event class for the replication of an entity.Deprecated.Defines an event class for the resolving of an entity id from the entity's natural-idDefines the contract for handling of resolve natural id events generated from a session.An event class for saveOrUpdate()
Session.replicate(java.lang.Object, org.hibernate.ReplicationMode)
is deprecated