public class PreUpdateEvent extends AbstractPreDatabaseOperationEvent
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getEntity, getEntityName, getId, getIdentifier, getPersister, getSource
getSession
public PreUpdateEvent(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.Object[] oldState, EntityPersister persister, EventSource source)
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.public java.lang.Object[] getState()
public java.lang.Object[] getOldState()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.