org.hibernate.event
Class PreUpdateEvent
java.lang.Object
org.hibernate.event.AbstractEvent
org.hibernate.event.AbstractPreDatabaseOperationEvent
org.hibernate.event.PreUpdateEvent
- All Implemented Interfaces:
- java.io.Serializable
public class PreUpdateEvent
- extends AbstractPreDatabaseOperationEvent
Represents a pre-update event, which occurs just prior to
performing the update of an entity in the database.
- Author:
- Gavin King, Steve Ebersole
- See Also:
- Serialized Form
Constructor Summary |
PreUpdateEvent(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] state,
java.lang.Object[] oldState,
EntityPersister persister,
EventSource source)
Constructs an event containing the pertinent information. |
Method Summary |
java.lang.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. |
java.lang.Object[] |
getState()
Retrieves the state to be used in the update. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreUpdateEvent
public PreUpdateEvent(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] state,
java.lang.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.
getState
public java.lang.Object[] getState()
- Retrieves the state to be used in the update.
- Returns:
- The current state.
getOldState
public java.lang.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.
- Returns:
- The loaded state, or null.
Copyright © 2008 Hibernate.org. All Rights Reserved.