Top Description Fields Constructors Methods
org.hibernate.event.spi

public Class PreUpdateEvent

extends AbstractPreDatabaseOperationEvent
Class Inheritance
Imports
java.io.Serializable, org.hibernate.persister.entity.EntityPersister

Deprecated

as a consequence of AbstractPreDatabaseOperationEvent being deprecated. See corresponding docs for further information.

Represents a pre-update event, which occurs just prior to performing the update of an entity in the database.
Authors
Gavin King, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private Object[]
private Object[]

Constructor Summary

AccessConstructor and Description
public
PreUpdateEvent(Object
The entity to be updated.
entity
,
Serializable
The id of the entity to use for updating.
id
,
Object[]
The state to be updated.
state
,
Object[]
The state of the entity at the time it was loaded from the database.
oldState
,
EntityPersister
The entity's persister.
persister
,
EventSource
The session from which the event originated.
source
)

Deprecated as a consequence of EventSource being deprecated.
Constructs an event containing the pertinent information.

Method Summary

Modifier and TypeMethod and Description
public Object[]

Returns:

The loaded state, or null.
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[]

Returns:

The current state.
getState
()

Retrieves the state to be used in the update.

Inherited from org.hibernate.event.spi.AbstractPreDatabaseOperationEvent:
getEntitygetEntityNamegetIdgetIdentifiergetPersistergetSource

Field Detail

oldStateback to summary
private Object[] oldState
stateback to summary
private Object[] state

Constructor Detail

PreUpdateEventback to summary
public PreUpdateEvent(Object entity, Serializable id, Object[] state, Object[] oldState, EntityPersister persister, EventSource source)

Deprecated

as a consequence of EventSource being deprecated. See corresponding docs for further information.

Constructs an event containing the pertinent information.

Parameters
entity:Object

The entity to be updated.

id:Serializable

The id of the entity to use for updating.

state:Object[]

The state to be updated.

oldState:Object[]

The state of the entity at the time it was loaded from the database.

persister:EntityPersister

The entity's persister.

source:EventSource

The session from which the event originated.

Method Detail

getOldStateback to summary
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.

Returns:Object[]

The loaded state, or null.

getStateback to summary
public Object[] getState()

Retrieves the state to be used in the update.

Returns:Object[]

The current state.