Package org.hibernate.event
Class AbstractPreDatabaseOperationEvent
java.lang.Object
org.hibernate.event.AbstractEvent
org.hibernate.event.AbstractPreDatabaseOperationEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PreDeleteEvent,PreInsertEvent,PreUpdateEvent
Represents an operation we are about to perform against the database.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractPreDatabaseOperationEvent(EventSource source, Object entity, Serializable id, EntityPersister persister) Constructs an event containing the pertinent information. -
Method Summary
Methods inherited from class org.hibernate.event.AbstractEvent
getSession
-
Constructor Details
-
AbstractPreDatabaseOperationEvent
public AbstractPreDatabaseOperationEvent(EventSource source, Object entity, Serializable id, EntityPersister persister) Constructs an event containing the pertinent information.- Parameters:
source- The session from which the event originated.entity- The entity to be invloved in the database operation.id- The entity id to be invloved 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 theentity.- Returns:
- The entity persister.
-
getSource
Deprecated.UseAbstractEvent.getSession()insteadGetter for property 'source'. This is the session from which the event originated. Some of the pre-* events had previous exposed the event source using getSource() because they had not originally extended fromAbstractEvent.- Returns:
- Value for property 'source'.
-
AbstractEvent.getSession()instead