Purpose: An implementation of the OptimisticLockingPolicy interface.
This policy compares only the changed fields in the WHERE clause
when doing an update. If any field has been changed, an optimistic
locking exception will be thrown. A delete will only compare
the primary key.
NOTE: This policy can only be used inside a unit of work.
Create a new changed fields locking policy.
This locking policy is based on locking on all changed fields by comparing with
their previous values to detect field-level collisions.
Note: the unit of work must be used for all updates when using field locking. Without
a unit of work, there is no way for to know what the original values were
without the back up clone in the unit of work.
public Expression buildDeleteExpression(org.eclipse.persistence.internal.helper.DatabaseTable table,
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.
No new criteria will be added for changed fields.
buildDeleteExpression in interface org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy