Skip navigation links

Oracle TopLink Java API Reference
10g Release 3 (10.1.3.1)

B28219-01


oracle.toplink.descriptors
Class ChangedFieldsLockingPolicy

java.lang.Object
  extended byoracle.toplink.descriptors.FieldsLockingPolicy
      extended byoracle.toplink.descriptors.ChangedFieldsLockingPolicy


public class ChangedFieldsLockingPolicy
extends FieldsLockingPolicy

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.

Since:
TopLink 2.1

Constructor Summary
ChangedFieldsLockingPolicy()
          PUBLIC: Create a new changed fields locking policy.

 

Methods inherited from class oracle.toplink.descriptors.FieldsLockingPolicy
isCascaded

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ChangedFieldsLockingPolicy

public ChangedFieldsLockingPolicy()
PUBLIC: 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 TopLink to know what the original values were without the back up clone in the unit of work.

Skip navigation links

Copyright © 1998, 2006, Oracle. All Rights Reserved.