Top Description Fields Constructors Methods
org.hibernate.action.internal

public Class EntityUpdateAction

extends EntityAction
Class Inheritance
Imports
java.io.Serializable, org.hibernate.AssertionFailure, .HibernateException, org.hibernate.cache.CacheException, org.hibernate.cache.spi.access.EntityDataAccess, .SoftLock, org.hibernate.cache.spi.entry.CacheEntry, org.hibernate.engine.internal.Versioning, org.hibernate.engine.spi.CachedNaturalIdValueSource, .EntityEntry, .PersistenceContext, .SessionEventListenerManager, .SessionFactoryImplementor, .SharedSessionContractImplementor, .Status, org.hibernate.event.service.spi.EventListenerGroup, org.hibernate.event.spi.EventType, .PostCommitUpdateEventListener, .PostUpdateEvent, .PostUpdateEventListener, .PreUpdateEvent, .PreUpdateEventListener, org.hibernate.persister.entity.EntityPersister, org.hibernate.stat.internal.StatsHelper, org.hibernate.stat.spi.StatisticsImplementor, org.hibernate.tuple.entity.EntityMetamodel, org.hibernate.type.TypeHelper

The action for performing entity updates.

Field Summary

Modifier and TypeField and Description
private Object
private final int[]
private final boolean
private SoftLock
private Object
private final Object[]
private final Object[]
private final Object
private final Object
private final Object[]

Constructor Summary

AccessConstructor and Description
public
EntityUpdateAction(final Serializable
The entity identifier
id
,
final Object[]
The current (extracted) entity state
state
,
final int[]
The indexes (in reference to state) properties with dirty state
dirtyProperties
,
final boolean
Were any collections dirty?
hasDirtyCollection
,
final Object[]
The previous (stored) state
previousState
,
final Object
The previous (stored) version
previousVersion
,
final Object
The incremented version
nextVersion
,
final Object
The entity instance
instance
,
final Object
The entity's row id
rowId
,
final EntityPersister
The entity's persister
persister
,
final SharedSessionContractImplementor
The session
session
)

Constructs an EntityUpdateAction

Method Summary

Modifier and TypeMethod and Description
protected boolean
protected boolean
cacheUpdate(EntityPersister persister, Object previousVersion, Object ck)

private Object[]
public void
doAfterTransactionCompletion(boolean
Did the transaction complete successfully? True means it did.
success
,
SharedSessionContractImplementor
The session on which the transaction is completing.
session
)

Implements org.hibernate.action.spi.AfterTransactionCompletionProcess.doAfterTransactionCompletion.

Perform whatever processing is encapsulated here after completion of the transaction.
public void
execute()

Implements org.hibernate.action.spi.Executable.execute.

Execute this action.
protected Object
public int[]
protected SoftLock
public Object
public Object[]
public Object[]
public Object
public Object
public Object[]
public boolean
protected boolean
private PostUpdateEvent
private void
protected void
postCommitUpdate(boolean success)

protected void
protected boolean
protected void
setCacheEntry(Object cacheEntry)

protected void
public void
setNextVersion(Object nextVersion)

Inherited from org.hibernate.action.internal.EntityAction:
afterDeserializebeforeExecutionscompareToeventSourcegetAfterTransactionCompletionProcessgetBeforeTransactionCompletionProcessgetDelayedIdgetEntityNamegetFastSessionServicesgetIdgetInstancegetPersistergetPropertySpacesgetSessionisVetolistenerGroupneedsAfterTransactionCompletionsetVetotoString

Field Detail

cacheEntryback to summary
private Object cacheEntry
dirtyFieldsback to summary
private final int[] dirtyFields
hasDirtyCollectionback to summary
private final boolean hasDirtyCollection
lockback to summary
private SoftLock lock
nextVersionback to summary
private Object nextVersion
previousNaturalIdValuesback to summary
private final Object[] previousNaturalIdValues
previousStateback to summary
private final Object[] previousState
previousVersionback to summary
private final Object previousVersion
rowIdback to summary
private final Object rowId
stateback to summary
private final Object[] state

Constructor Detail

EntityUpdateActionback to summary
public EntityUpdateAction(final Serializable id, final Object[] state, final int[] dirtyProperties, final boolean hasDirtyCollection, final Object[] previousState, final Object previousVersion, final Object nextVersion, final Object instance, final Object rowId, final EntityPersister persister, final SharedSessionContractImplementor session)

Constructs an EntityUpdateAction

Parameters
id:Serializable

The entity identifier

state:Object[]

The current (extracted) entity state

dirtyProperties:int[]

The indexes (in reference to state) properties with dirty state

hasDirtyCollection:boolean

Were any collections dirty?

previousState:Object[]

The previous (stored) state

previousVersion:Object

The previous (stored) version

nextVersion:Object

The incremented version

instance:Object

The entity instance

rowId:Object

The entity's row id

persister:EntityPersister

The entity's persister

session:SharedSessionContractImplementor

The session

Method Detail

cacheAfterUpdateback to summary
protected boolean cacheAfterUpdate(EntityDataAccess cache, Object ck)
cacheUpdateback to summary
protected boolean cacheUpdate(EntityPersister persister, Object previousVersion, Object ck)
determinePreviousNaturalIdValuesback to summary
private Object[] determinePreviousNaturalIdValues(EntityPersister persister, Object[] previousState, SharedSessionContractImplementor session, Serializable id)
doAfterTransactionCompletionback to summary
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session) throws CacheException

Implements org.hibernate.action.spi.AfterTransactionCompletionProcess.doAfterTransactionCompletion.

Doc from org.hibernate.action.spi.AfterTransactionCompletionProcess.doAfterTransactionCompletion.

Perform whatever processing is encapsulated here after completion of the transaction.

Parameters
success:boolean

Did the transaction complete successfully? True means it did.

session:SharedSessionContractImplementor

The session on which the transaction is completing.

Annotations
@Override
executeback to summary
public void execute() throws HibernateException

Implements org.hibernate.action.spi.Executable.execute.

Doc from org.hibernate.action.spi.Executable.execute.

Execute this action.

Annotations
@Override
Exceptions
HibernateException:
Indicates a problem during execution.
getCacheEntryback to summary
protected Object getCacheEntry()
getDirtyFieldsback to summary
public int[] getDirtyFields()
getLockback to summary
protected SoftLock getLock()
getNextVersionback to summary
public Object getNextVersion()
getPreviousNaturalIdValuesback to summary
public Object[] getPreviousNaturalIdValues()
getPreviousStateback to summary
public Object[] getPreviousState()
getPreviousVersionback to summary
public Object getPreviousVersion()
getRowIdback to summary
public Object getRowId()
getStateback to summary
public Object[] getState()
hasDirtyCollectionback to summary
public boolean hasDirtyCollection()
hasPostCommitEventListenersback to summary
protected boolean hasPostCommitEventListeners()

Implements abstract org.hibernate.action.internal.EntityAction.hasPostCommitEventListeners.

Annotations
@Override
newPostUpdateEventback to summary
private PostUpdateEvent newPostUpdateEvent()
onPostCommitFailureback to summary
private void onPostCommitFailure(PostUpdateEventListener listener, PostUpdateEvent event)
postCommitUpdateback to summary
protected void postCommitUpdate(boolean success)
postUpdateback to summary
protected void postUpdate()
preUpdateback to summary
protected boolean preUpdate()
setCacheEntryback to summary
protected void setCacheEntry(Object cacheEntry)
setLockback to summary
protected void setLock(SoftLock lock)
setNextVersionback to summary
public void setNextVersion(Object nextVersion)