Top Description Interfaces Classes
[default module]

Package org.hibernate.event.spi


Defines the event types and event listener interfaces for events produced by the stateful org.hibernate.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 org.hibernate.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 venerable org.hibernate.Interceptor interface.

Interface Summary

Modifier and TypeInterface and Description
public interface
AutoFlushEventListener

Defines the contract for handling of session auto-flush events.

public interface
public interface
DeleteContext

A DeleteEvent represents a delete operation applied to a single entity.

public interface
DeleteEventListener

Defines the contract for handling of deletion events generated from a session.

public interface
DirtyCheckEventListener

Defines the contract for handling of session dirty-check events.

public interface
EntityCopyObserver

An observer for detection of multiple entity representations for a persistent entity being merged.

public interface
public interface
public interface
EventEngineContributor

Integration contract for contributing event types and listeners to the Hibernate event system.

public interface
public interface
public interface
EvictEventListener

Defines the contract for handling of evict events generated from a session.

public interface
public interface
FlushEventListener

Defines the contract for handling of session flush events.

public interface
public interface
InitializeCollectionEventListener

Defines the contract for handling of collection initialization events generated by a session.

public interface
LoadEventListener

Defines the contract for handling of load events generated from a session.

public interface
LockEventListener

Defines the contract for handling of lock events generated from a session.

public interface
MergeEventListener

Defines the contract for handling of merge events generated from a session.

public interface
PersistContext

A PersistEvent represents a persist operation applied to a single entity.

public interface
PersistEventListener

Defines the contract for handling of create events generated from a session.

pack-priv interface
public interface
PostCollectionRecreateEventListener

Called after recreating a collection

public interface
PostCollectionRemoveEventListener

Called after removing a collection

public interface
PostCollectionUpdateEventListener

Called after updating a collection

public interface
PostCommitDeleteEventListener

Called after an entity delete is committed to the datastore.

public interface
PostCommitInsertEventListener

Called after an entity insert is committed to the datastore.

public interface
PostCommitUpdateEventListener

Called after an entity update is committed to the datastore.

public interface
PostDeleteEventListener

Called after deleting an item from the datastore

public interface
PostInsertEventListener

Called after inserting an item in the datastore

public interface
PostLoadEventListener

Occurs after an entity instance is fully loaded.

public interface
PostUpdateEventListener

Called after updating the datastore

public interface
PreCollectionRecreateEventListener

Called before recreating a collection

public interface
PreCollectionRemoveEventListener

Called before removing a collection

public interface
PreCollectionUpdateEventListener

Called before updating a collection

public interface
PreDeleteEventListener

Called before deleting an item from the datastore

public interface
PreInsertEventListener

Called before inserting an item in the datastore

public interface
PreLoadEventListener

Called before injecting property values into a newly loaded entity instance.

public interface
PreUpdateEventListener

Called before updating the datastore

public interface
RefreshContext

A RefreshEvent represents a refresh operation applied to a single entity.

public interface
RefreshEventListener

Defines the contract for handling of refresh events generated from a session.

public interface
ReplicateEventListener

Deprecated since 6. since org.hibernate.Session#replicate is deprecated
Defines the contract for handling of replicate events generated from a session.
public interface
ResolveNaturalIdEventListener

Defines the contract for handling of resolve natural id events generated from a session.

public interface
SaveOrUpdateEventListener

Deprecated since 6. since org.hibernate.Session#saveOrUpdate and friends are deprecated
Defines the contract for handling of update events generated from a session.

Class Summary

Modifier and TypeClass and Description
public abstract class
AbstractCollectionEvent

Defines a base class for events involving collections.

public abstract class
AbstractEvent

Defines a base class for org.hibernate.Session-generated events.

public abstract class
AbstractPreDatabaseOperationEvent

Represents an operation we are about to perform against the database.

public class
AutoFlushEvent

Defines an event class for the auto-flushing of a session.

public class
public class
DeleteEvent

Defines an event class for the deletion of an entity.

public class
DirtyCheckEvent

Defines an event class for the dirty-checking of a session.

public class
EventEngine

Composite for the things related to Hibernate's event system.

public class
EventType<T>

Enumeration of the recognized types of events, including meta-information about each.

public class
EvictEvent

Defines an event class for the evicting of an entity.

public class
public class
FlushEvent

Defines an event class for the flushing of a session.

public class
InitializeCollectionEvent

An event that occurs when a collection wants to be initialized

public class
LoadEvent

Defines an event class for the loading of an entity.

public class
LockEvent

Defines an event class for the locking of an entity.

public class
MergeContext

MergeContext is a specialized Map implementation used by a merge event listener to keep track of each entity being merged and its corresponding managed result.

public class
MergeEvent

An event class for merge() and saveOrUpdateCopy()

public class
PersistEvent

An event class for persist()

public class
PostCollectionRecreateEvent

An event that occurs after a collection is recreated

public class
PostCollectionRemoveEvent

An event that occurs after a collection is removed

public class
PostCollectionUpdateEvent

An event that occurs after a collection is updated

public class
PostDeleteEvent

Occurs after deleting an item from the datastore

public class
PostInsertEvent

Occurs after inserting an item in the datastore

public class
PostLoadEvent

Occurs after an entity instance is fully loaded.

public class
PostUpdateEvent

Occurs after the datastore is updated

public class
PreCollectionRecreateEvent

An event that occurs before a collection is recreated

public class
PreCollectionRemoveEvent

An event that occurs before a collection is removed

public class
PreCollectionUpdateEvent

An event that occurs before a collection is updated

public class
PreDeleteEvent

Represents a pre-delete event, which occurs just prior to performing the deletion of an entity from the database.

public class
PreInsertEvent

Represents a pre-insert event, which occurs just prior to performing the insert of an entity into the database.

public class
PreLoadEvent

Called before injecting property values into a newly loaded entity instance.

public class
PreUpdateEvent

Represents a pre-update event, which occurs just prior to performing the update of an entity in the database.

public class
RefreshEvent

Defines an event class for the refreshing of an object.

public class
ReplicateEvent

Defines an event class for the replication of an entity.

public class
ResolveNaturalIdEvent

Defines an event class for the resolving of an entity id from the entity's natural-id

public class
SaveOrUpdateEvent

An event class for saveOrUpdate()