Package org.hibernate.event.spi
Class PreDeleteEvent
java.lang.Object
org.hibernate.event.spi.AbstractEvent
org.hibernate.event.spi.AbstractPreDatabaseOperationEvent
org.hibernate.event.spi.PreDeleteEvent
- All Implemented Interfaces:
Serializable
Represents a
pre-delete
event, which occurs just prior to
performing the deletion of an entity from the database.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPreDeleteEvent
(Object entity, Object id, Object[] deletedState, EntityPersister persister, EventSource source) Constructs an event containing the pertinent information. -
Method Summary
Methods inherited from class org.hibernate.event.spi.AbstractPreDatabaseOperationEvent
getEntity, getFactory, getId, getPersister
Methods inherited from class org.hibernate.event.spi.AbstractEvent
getSession
-
Constructor Details
-
PreDeleteEvent
public PreDeleteEvent(Object entity, Object id, Object[] deletedState, EntityPersister persister, EventSource source) Constructs an event containing the pertinent information.- Parameters:
entity
- The entity to be deleted.id
- The id to use in the deletion.deletedState
- The entity's state at deletion time.persister
- The entity's persister.source
- The session from which the event originated.
-
-
Method Details
-
getDeletedState
Getter for property 'deletedState'. This is the entity state at the time of deletion (useful for optimistic locking and such).- Returns:
- Value for property 'deletedState'.
-