org.hibernate.event
Class PreDeleteEvent

java.lang.Object
  extended by org.hibernate.event.AbstractEvent
      extended by org.hibernate.event.AbstractPreDatabaseOperationEvent
          extended by org.hibernate.event.PreDeleteEvent
All Implemented Interfaces:
Serializable

public class PreDeleteEvent
extends AbstractPreDatabaseOperationEvent

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

Author:
Gavin King, Steve Ebersole
See Also:
Serialized Form

Constructor Summary
PreDeleteEvent(Object entity, Serializable id, Object[] deletedState, EntityPersister persister, EventSource source)
          Constructs an event containing the pertinent information.
 
Method Summary
 Object[] getDeletedState()
          Getter for property 'deletedState'.
 
Methods inherited from class org.hibernate.event.AbstractPreDatabaseOperationEvent
getEntity, getId, getPersister, getSource
 
Methods inherited from class org.hibernate.event.AbstractEvent
getSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreDeleteEvent

public PreDeleteEvent(Object entity,
                      Serializable 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 Detail

getDeletedState

public Object[] getDeletedState()
Getter for property 'deletedState'. This is the entity state at the time of deletion (useful for optomistic locking and such).

Returns:
Value for property 'deletedState'.


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.