Top Description Fields Constructors Methods
org.eclipse.persistence.descriptors

public Class VersionLockingPolicy

extends Object
implements OptimisticLockingPolicy, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy, java.lang.Cloneable
Known Direct Subclasses
org.eclipse.persistence.descriptors.TimestampLockingPolicy
Imports
java.io.*, java.util.*, org.eclipse.persistence.mappings.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.queries.*, org.eclipse.persistence.expressions.*, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.internal.descriptors.ObjectBuilder, .OptimisticLockingPolicy, org.eclipse.persistence.internal.identitymaps.CacheKey, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .DirectToFieldChangeRecord, .ObjectChangeSet, .UnitOfWorkImpl, org.eclipse.persistence.mappings.foundation.AbstractDirectMapping

Purpose: Used to allow a single version number to be used for optimistic locking.

Since
TOPLink/Java 2.0

Field Summary

Modifier and TypeField and Description
protected transient Expression
protected ClassDescriptor
public static final int
public static final int
protected boolean
protected AbstractDirectMapping
lockMapping

PERF: Cache the lock mapping if mapped with a direct mapping.

protected OptimisticLockingPolicy.LockOnChange
protected int
protected DatabaseField

Constructor Summary

AccessConstructor and Description
public
VersionLockingPolicy()

PUBLIC: Create a new VersionLockingPolicy.

public
VersionLockingPolicy(String
specifies the field name for the write lock field.
fieldName
)

PUBLIC: Create a new VersionLockingPolicy.

public
VersionLockingPolicy(DatabaseField
the write lock field.
field
)

PUBLIC: Create a new VersionLockingPolicy.

Method Summary

Modifier and TypeMethod and Description
public void
public void
addLockValuesToTranslationRow(ObjectLevelModifyQuery query)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.addLockValuesToTranslationRow.

INTERNAL: This method adds the lock value to the translation row of the passed in query.
public Expression
buildDeleteExpression(DatabaseTable table, Expression mainExpression, AbstractRecord row)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.buildDeleteExpression.

INTERNAL: When given an expression, this method will return a new expression with the optimistic locking values included.
protected Expression
buildExpression()

INTERNAL: Returns an expression that will be used for both the update and delete where clause

public Expression
buildUpdateExpression(DatabaseTable table, Expression mainExpression, AbstractRecord row, AbstractRecord row2)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.buildUpdateExpression.

INTERNAL: When given an expression, this method will return a new expression with the optimistic locking values included.
public Object
public int
public <T> T
getBaseValue()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getBaseValue.

INTERNAL: This is the base value that is older than all other values, it is used in the place of null in some situations.
protected <T> Class<T>
getDefaultLockingFieldType()

INTERNAL: Return the default version locking filed java type, default is BigDecimal

protected ClassDescriptor
getDescriptor()

INTERNAL:

protected <T> T
getInitialWriteValue(AbstractSession session)

INTERNAL: returns the initial locking value

public OptimisticLockingPolicy.LockOnChange
getLockOnChangeMode()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getLockOnChangeMode.

ADVANCED: returns the LockOnChange mode for this policy.
public <T> T
getNewLockValue(ModifyQuery query)

INTERNAL: This method gets the write lock value from either the cache or the object stored in the query.

protected Vector<DatabaseField>
getUnmappedFields()

INTERNAL: This method returns any of the fields that are not mapped in the object.

public <T> T
getValueToPutInCache(AbstractRecord row, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getValueToPutInCache.

INTERNAL: Return the value that should be stored in the identity map.
public int
getVersionDifference(Object
the new lock value
currentValue
,
Object
the object containing the version to be compared to
domainObject
,
Object
a vector containing the primary keys of the domainObject
primaryKeys
,
AbstractSession
the session to be used with the comparison
session
)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getVersionDifference.

PUBLIC: Return the number of versions different between these objects.
public AbstractDirectMapping
getVersionMapping()

INTERNAL: Returns the mapping that will be used to access the version value from an object.

public DatabaseField
public String
getWriteLockFieldName()

PUBLIC: Return the field name of the field that stores the write lock value.

public Expression
public <T> T
getWriteLockValue(Object domainObject, Object primaryKey, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getWriteLockValue.

INTERNAL: This method will return the optimistic lock value for the object
protected Number
incrementWriteLockValue(Number numberValue)

INTERNAL: Adds 1 to the value passed in.

public void
initialize(AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.initialize.

INTERNAL: It is responsible for initializing the policy;
public void
initializeProperties()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.initializeProperties.

INTERNAL: It is responsible for initializing the policy properties;
public boolean
isCascaded()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isCascaded.

PUBLIC: Return true if the policy uses cascade locking.
public boolean
isNewerVersion(Object currentValue, Object domainObject, Object primaryKey, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isNewerVersion.

INTERNAL: Compares the value with the value from the object (or cache).
public boolean
isNewerVersion(AbstractRecord databaseRow, Object domainObject, Object primaryKey, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isNewerVersion.

INTERNAL: Compares the value from the row and from the object (or cache).
public boolean
isNewerVersion(Object firstLockFieldValue, Object secondWriteLockFieldValue)

INTERNAL: Compares two values.

public boolean
isStoredInCache()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isStoredInCache.

PUBLIC: Return true if the lock value is stored in the cache.
public boolean
isStoredInObject()

PUBLIC: Return true if the lock value is stored in the object.

protected Object
lockValueFromObject(Object domainObject)

INTERNAL: Retrieves the lock value from the object.

public void
mergeIntoParentCache(UnitOfWorkImpl uow, Object primaryKey, Object object)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.mergeIntoParentCache.

INTERNAL: Only applicable when the value is stored in the cache.
public void
mergeIntoParentCache(CacheKey unitOfWorkCacheKey, CacheKey parentSessionCacheKey)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.mergeIntoParentCache.

INTERNAL: This method should merge changes from the parent into the child.
public void
public void
setIsCascaded(boolean
set this to true if you would like cascade the locking and set it to false if you would like no cascade locking.
isCascaded
)

PUBLIC: Set whether to use cascade locking on the policy.

public void
setIsStoredInCache(boolean
set this to true if you would like to store lock in the cache and set it to false if you would like to store it in the object.
isStoredInCache
)

PUBLIC: Set whether to store the lock in the cache or in the object.

public void
public void
public void
setWriteLockField(DatabaseField writeLockField)

ADVANCED: Set the write lock field.

public void
setWriteLockFieldName(String
the name of the field to lock against.
writeLockFieldName
)

PUBLIC: Set the write lock field name.

public boolean
shouldUpdateVersionOnMappingChange()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.shouldUpdateVersionOnMappingChange.

INTERNAL: Returns true if the policy has been set to set an optimistic read lock when any mapping changes.
public boolean
shouldUpdateVersionOnOwnedMappingChange()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.shouldUpdateVersionOnOwnedMappingChange.

INTERNAL: Returns true if the policy has been set to set an optimistic read lock when a owning mapping changes.
public void
storeInCache()

PUBLIC: Configure the version lock value to be stored in the cache.

public void
storeInObject()

PUBLIC: Configure the version lock value to be stored in the object.

public boolean
supportsWriteLockValuesComparison()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.supportsWriteLockValuesComparison.

INTERNAL: Indicates that compareWriteLockValues method is supported by the policy.
public void
public void
updateRowAndObjectForUpdate(ObjectLevelModifyQuery query, Object domainObject)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.updateRowAndObjectForUpdate.

INTERNAL: This method updates the modify row, and the domain object with the new lock value.
protected void
updateWriteLockValueForWrite(ObjectLevelModifyQuery query, Object lockValue)

INTERNAL: Update the row, object and change set with the version value.

public void
validateDelete(int rowCount, Object object, DeleteObjectQuery query)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.validateDelete.

INTERNAL: Check the row count for lock failure.
public void
validateUpdate(int rowCount, Object object, WriteObjectQuery query)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.validateUpdate.

INTERNAL: Check the row count for lock failure.
public void
writeLockValueIntoRow(ObjectLevelModifyQuery query, Object domainObject)

INTERNAL: This method updates the modify row with the old lock value.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cachedExpressionback to summary
protected transient Expression cachedExpression
descriptorback to summary
protected ClassDescriptor descriptor
IN_CACHEback to summary
public static final int IN_CACHE
IN_OBJECTback to summary
public static final int IN_OBJECT
isCascadedback to summary
protected boolean isCascaded
lockMappingback to summary
protected AbstractDirectMapping lockMapping

PERF: Cache the lock mapping if mapped with a direct mapping.

lockOnChangeModeback to summary
protected OptimisticLockingPolicy.LockOnChange lockOnChangeMode
lockValueStoredback to summary
protected int lockValueStored
writeLockFieldback to summary
protected DatabaseField writeLockField

Constructor Detail

VersionLockingPolicyback to summary
public VersionLockingPolicy()

PUBLIC: Create a new VersionLockingPolicy. Defaults to storing the lock value in the cache.

VersionLockingPolicyback to summary
public VersionLockingPolicy(String fieldName)

PUBLIC: Create a new VersionLockingPolicy. Defaults to storing the lock value in the cache.

Parameters
fieldName:String

specifies the field name for the write lock field.

VersionLockingPolicyback to summary
public VersionLockingPolicy(DatabaseField field)

PUBLIC: Create a new VersionLockingPolicy. Defaults to storing the lock value in the cache.

Parameters
field:DatabaseField

the write lock field.

Method Detail

addLockFieldsToUpdateRowback to summary
public void addLockFieldsToUpdateRow(AbstractRecord databaseRow, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.addLockFieldsToUpdateRow.

INTERNAL: Add update fields for template row. These are any unmapped fields required to write in an update.

Annotations
@Override
addLockValuesToTranslationRowback to summary
public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.addLockValuesToTranslationRow.

INTERNAL: This method adds the lock value to the translation row of the passed in query. depending on the storage flag, the value is either retrieved from the cache of the object.

Annotations
@Override
buildDeleteExpressionback to summary
public Expression buildDeleteExpression(DatabaseTable table, Expression mainExpression, AbstractRecord row)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.buildDeleteExpression.

INTERNAL: When given an expression, this method will return a new expression with the optimistic locking values included. The values are taken from the passed in database row. This expression will be used in a delete call.

Annotations
@Override
buildExpressionback to summary
protected Expression buildExpression()

INTERNAL: Returns an expression that will be used for both the update and delete where clause

buildUpdateExpressionback to summary
public Expression buildUpdateExpression(DatabaseTable table, Expression mainExpression, AbstractRecord row, AbstractRecord row2)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.buildUpdateExpression.

INTERNAL: When given an expression, this method will return a new expression with the optimistic locking values included. The values are taken from the passed in database row. This expression will be used in an update call.

Annotations
@Override
cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.clone.

INTERNAL: Clone the policy

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
compareWriteLockValuesback to summary
public int compareWriteLockValues(Object value1, Object value2)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.compareWriteLockValues.

INTERNAL: This method compares two writeLockValues. The writeLockValues should be non-null and of type Number. Returns: -1 if value1 is less (older) than value2; 0 if value1 equals value2; 1 if value1 is greater (newer) than value2. Throws: NullPointerException if the passed value is null; ClassCastException if the passed value is of a wrong type.

Annotations
@Override
getBaseValueback to summary
public <T> T getBaseValue()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getBaseValue.

INTERNAL: This is the base value that is older than all other values, it is used in the place of null in some situations.

Annotations
@Override
@SuppressWarnings:unchecked
getDefaultLockingFieldTypeback to summary
protected <T> Class<T> getDefaultLockingFieldType()

INTERNAL: Return the default version locking filed java type, default is BigDecimal

Annotations
@SuppressWarnings:unchecked
getDescriptorback to summary
protected ClassDescriptor getDescriptor()

INTERNAL:

getInitialWriteValueback to summary
protected <T> T getInitialWriteValue(AbstractSession session)

INTERNAL: returns the initial locking value

Annotations
@SuppressWarnings:unchecked
getLockOnChangeModeback to summary
public OptimisticLockingPolicy.LockOnChange getLockOnChangeMode()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getLockOnChangeMode.

ADVANCED: returns the LockOnChange mode for this policy. This mode specifies if a Optimistic Write lock should be enforced on this entity when a set of mappings are changed. Unfortunately this locking policy can not enforce an optimistic write lock unless a FK or DTF field has changed so this type returns LockOnChange.NONE

Annotations
@Override
getNewLockValueback to summary
public <T> T getNewLockValue(ModifyQuery query)

INTERNAL: This method gets the write lock value from either the cache or the object stored in the query. It then returns the new incremented value.

Annotations
@SuppressWarnings:unchecked
getUnmappedFieldsback to summary
protected Vector<DatabaseField> getUnmappedFields()

INTERNAL: This method returns any of the fields that are not mapped in the object. In the case of the value being stored in the cache, a vector with one value is returned. In the case of being stored in the object, an empty vector is returned.

getValueToPutInCacheback to summary
public <T> T getValueToPutInCache(AbstractRecord row, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getValueToPutInCache.

INTERNAL: Return the value that should be stored in the identity map. If the value is stored in the object, then return a null.

Annotations
@Override
@SuppressWarnings:unchecked
getVersionDifferenceback to summary
public int getVersionDifference(Object currentValue, Object domainObject, Object primaryKeys, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getVersionDifference.

PUBLIC: Return the number of versions different between these objects.

Parameters
currentValue:Object

the new lock value

domainObject:Object

the object containing the version to be compared to

primaryKeys:Object

a vector containing the primary keys of the domainObject

session:AbstractSession

the session to be used with the comparison

Annotations
@Override
getVersionMappingback to summary
public AbstractDirectMapping getVersionMapping()

INTERNAL: Returns the mapping that will be used to access the version value from an object.

getWriteLockFieldback to summary
public DatabaseField getWriteLockField()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getWriteLockField.

INTERNAL: Return the write lock field.

Annotations
@Override
getWriteLockFieldNameback to summary
public String getWriteLockFieldName()

PUBLIC: Return the field name of the field that stores the write lock value.

getWriteLockUpdateExpressionback to summary
public Expression getWriteLockUpdateExpression(ExpressionBuilder builder, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getWriteLockUpdateExpression.

INTERNAL: Retrun an expression that updates the write lock

Annotations
@Override
getWriteLockValueback to summary
public <T> T getWriteLockValue(Object domainObject, Object primaryKey, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.getWriteLockValue.

INTERNAL: This method will return the optimistic lock value for the object

Annotations
@Override
@SuppressWarnings:unchecked
incrementWriteLockValueback to summary
protected Number incrementWriteLockValue(Number numberValue)

INTERNAL: Adds 1 to the value passed in.

initializeback to summary
public void initialize(AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.initialize.

INTERNAL: It is responsible for initializing the policy;

Annotations
@Override
initializePropertiesback to summary
public void initializeProperties()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.initializeProperties.

INTERNAL: It is responsible for initializing the policy properties;

Annotations
@Override
isCascadedback to summary
public boolean isCascaded()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isCascaded.

PUBLIC: Return true if the policy uses cascade locking.

Annotations
@Override
isNewerVersionback to summary
public boolean isNewerVersion(Object currentValue, Object domainObject, Object primaryKey, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isNewerVersion.

INTERNAL: Compares the value with the value from the object (or cache). Will return true if the currentValue is newer than the domainObject.

Annotations
@Override
isNewerVersionback to summary
public boolean isNewerVersion(AbstractRecord databaseRow, Object domainObject, Object primaryKey, AbstractSession session)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isNewerVersion.

INTERNAL: Compares the value from the row and from the object (or cache). Will return true if the row is newer than the object.

Annotations
@Override
isNewerVersionback to summary
public boolean isNewerVersion(Object firstLockFieldValue, Object secondWriteLockFieldValue)

INTERNAL: Compares two values. Will return true if the firstLockFieldValue is newer than the secondWriteLockFieldValue.

isStoredInCacheback to summary
public boolean isStoredInCache()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.isStoredInCache.

PUBLIC: Return true if the lock value is stored in the cache.

Annotations
@Override
isStoredInObjectback to summary
public boolean isStoredInObject()

PUBLIC: Return true if the lock value is stored in the object.

lockValueFromObjectback to summary
protected Object lockValueFromObject(Object domainObject)

INTERNAL: Retrieves the lock value from the object.

mergeIntoParentCacheback to summary
public void mergeIntoParentCache(UnitOfWorkImpl uow, Object primaryKey, Object object)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.mergeIntoParentCache.

INTERNAL: Only applicable when the value is stored in the cache. Will merge with the parent unit of work.

Annotations
@Override
mergeIntoParentCacheback to summary
public void mergeIntoParentCache(CacheKey unitOfWorkCacheKey, CacheKey parentSessionCacheKey)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.mergeIntoParentCache.

INTERNAL: This method should merge changes from the parent into the child. #see this method in VersionLockingPolicy

Annotations
@Override
setDescriptorback to summary
public void setDescriptor(ClassDescriptor descriptor)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.setDescriptor.

INTERNAL:

Annotations
@Override
setIsCascadedback to summary
public void setIsCascaded(boolean isCascaded)

PUBLIC: Set whether to use cascade locking on the policy.

Parameters
isCascaded:boolean

set this to true if you would like cascade the locking and set it to false if you would like no cascade locking.

setIsStoredInCacheback to summary
public void setIsStoredInCache(boolean isStoredInCache)

PUBLIC: Set whether to store the lock in the cache or in the object.

Parameters
isStoredInCache:boolean

set this to true if you would like to store lock in the cache and set it to false if you would like to store it in the object.

setLockOnChangeModeback to summary
public void setLockOnChangeMode(OptimisticLockingPolicy.LockOnChange lockOnChangeMode)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.setLockOnChangeMode.

ADVANCED: Sets the LockOnChange mode for this policy. This mode specifies if a Optimistic Write lock should be enforced on this entity when set of mappings are changed.

Annotations
@Override
setupWriteFieldsForInsertback to summary
public void setupWriteFieldsForInsert(ObjectLevelModifyQuery query)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.setupWriteFieldsForInsert.

INTERNAL: This method must be included in any locking policy. Put the initial writelock value into the modifyRow.

Annotations
@Override
setWriteLockFieldback to summary
public void setWriteLockField(DatabaseField writeLockField)

ADVANCED: Set the write lock field. This can be used for advanced field types, such as XML nodes, or to set the field type.

setWriteLockFieldNameback to summary
public void setWriteLockFieldName(String writeLockFieldName)

PUBLIC: Set the write lock field name.

Parameters
writeLockFieldName:String

the name of the field to lock against.

shouldUpdateVersionOnMappingChangeback to summary
public boolean shouldUpdateVersionOnMappingChange()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.shouldUpdateVersionOnMappingChange.

INTERNAL: Returns true if the policy has been set to set an optimistic read lock when any mapping changes.

Annotations
@Override
shouldUpdateVersionOnOwnedMappingChangeback to summary
public boolean shouldUpdateVersionOnOwnedMappingChange()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.shouldUpdateVersionOnOwnedMappingChange.

INTERNAL: Returns true if the policy has been set to set an optimistic read lock when a owning mapping changes.

Annotations
@Override
storeInCacheback to summary
public void storeInCache()

PUBLIC: Configure the version lock value to be stored in the cache. This allows for the object not to require to store its version value as an attribute.

Note

if using a stateless model where the object can be passed to a client and then later updated in a different transaction context, then the version lock value should not be stored in the cache, but in the object to ensure it is the correct value for that object. This is the default.

storeInObjectback to summary
public void storeInObject()

PUBLIC: Configure the version lock value to be stored in the object. The object must define a mapping and an attribute to store the version value.

Note

the value will be updated internally by EclipseLink and should not be updated by the application.

supportsWriteLockValuesComparisonback to summary
public boolean supportsWriteLockValuesComparison()

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.supportsWriteLockValuesComparison.

INTERNAL: Indicates that compareWriteLockValues method is supported by the policy.

Annotations
@Override
updateObjectWithWriteValueback to summary
public void updateObjectWithWriteValue(ObjectLevelModifyQuery query, Object lockValue)
updateRowAndObjectForUpdateback to summary
public void updateRowAndObjectForUpdate(ObjectLevelModifyQuery query, Object domainObject)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.updateRowAndObjectForUpdate.

INTERNAL: This method updates the modify row, and the domain object with the new lock value.

Annotations
@Override
updateWriteLockValueForWriteback to summary
protected void updateWriteLockValueForWrite(ObjectLevelModifyQuery query, Object lockValue)

INTERNAL: Update the row, object and change set with the version value. This handles the version being mapped in nested aggregates, writable or read-only.

validateDeleteback to summary
public void validateDelete(int rowCount, Object object, DeleteObjectQuery query)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.validateDelete.

INTERNAL: Check the row count for lock failure.

Annotations
@Override
validateUpdateback to summary
public void validateUpdate(int rowCount, Object object, WriteObjectQuery query)

Implements org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.validateUpdate.

INTERNAL: Check the row count for lock failure.

Annotations
@Override
writeLockValueIntoRowback to summary
public void writeLockValueIntoRow(ObjectLevelModifyQuery query, Object domainObject)

INTERNAL: This method updates the modify row with the old lock value.