Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » event » [javadoc | source]
org.hibernate.event
public class: PreUpdateEvent [javadoc | source]
java.lang.Object
   org.hibernate.event.AbstractEvent
      org.hibernate.event.AbstractPreDatabaseOperationEvent
         org.hibernate.event.PreUpdateEvent

All Implemented Interfaces:
    Serializable

Represents a pre-update event, which occurs just prior to performing the update of an entity in the database.
Constructor:
 public PreUpdateEvent(Object entity,
    Serializable id,
    Object[] state,
    Object[] oldState,
    EntityPersister persister,
    EventSource source) 
    Constructs an event containing the pertinent information.
    Parameters:
    entity - The entity to be updated.
    id - The id of the entity to use for updating.
    state - The state to be updated.
    oldState - The state of the entity at the time it was loaded from the database.
    persister - The entity's persister.
    source - The session from which the event originated.
Method from org.hibernate.event.PreUpdateEvent Summary:
getOldState,   getState
Methods from org.hibernate.event.AbstractPreDatabaseOperationEvent:
getEntity,   getId,   getPersister,   getSource
Methods from org.hibernate.event.AbstractEvent:
getSession
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.event.PreUpdateEvent Detail:
 public Object[] getOldState() 
    The old state of the entity at the time it was last loaded from the database; can be null in the case of detached entities.
 public Object[] getState() 
    Retrieves the state to be used in the update.