Package org.hibernate.event.spi
Class AbstractDatabaseOperationEvent
java.lang.Object
org.hibernate.event.spi.AbstractEvent
org.hibernate.event.spi.AbstractDatabaseOperationEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractPostDatabaseOperationEvent
,AbstractPreDatabaseOperationEvent
Abstract supertype of
AbstractPostDatabaseOperationEvent
and AbstractPostDatabaseOperationEvent
.- Since:
- 7
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractDatabaseOperationEvent
(EventSource source, Object entity, Object id, EntityPersister persister) Constructs an event containing the pertinent information. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the entity involved in the database operation.The factory which owns the persister for the entity.getId()
The id to be used in the database operation.The persister for the entity.Methods inherited from class org.hibernate.event.spi.AbstractEvent
getSession
-
Constructor Details
-
AbstractDatabaseOperationEvent
public AbstractDatabaseOperationEvent(EventSource source, Object entity, Object id, EntityPersister persister) Constructs an event containing the pertinent information.- Parameters:
source
- The session from which the event originated.entity
- The entity to be involved in the database operation.id
- The entity id to be involved in the database operation.persister
- The entity's persister.
-
-
Method Details
-
getEntity
Retrieves the entity involved in the database operation.- Returns:
- The entity.
-
getId
The id to be used in the database operation.- Returns:
- The id.
-
getPersister
The persister for the entity.- Returns:
- The entity persister.
-
getFactory
The factory which owns the persister for the entity.- Overrides:
getFactory
in classAbstractEvent
- Returns:
- The factory
-