|
Oracle Application Server TopLink API Reference 10g (9.0.4.3) B10491-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.toplink.descriptors.FieldsLockingPolicy
Purpose: An abstract superclass of some implementations of the OptimisticLockingPolicy interface. All of the subclasses of this class implement OptimisticLocking based on mapped fields in the object. These fields are only compared and not modified. Any modification (incrementing etc..) must be handled by the application.
AllFieldsLockingPolicy, ChangedFieldsLockingPolicy, SelectedFieldsLockingPolicy, Serialized Form| Constructor Summary | |
FieldsLockingPolicy()PUBLIC: Create a new field locking policy. | |
| Method Summary | |
void |
addLockFieldsToUpdateRow(DatabaseRow databaseRow, oracle.toplink.publicinterface.Session session)INTERNAL: Add update fields for template row. |
abstract void |
addLockValuesToTranslationRow(ObjectLevelModifyQuery query)INTERNAL: Values to be included in the locking mechanism are added to the translation row. |
Expression |
buildDeleteExpression(oracle.toplink.internal.helper.DatabaseTable table, Expression mainExpression, DatabaseRow row)INTERNAL: When given an expression, this method will return a new expression with the optimistic locking values included. |
Expression |
buildUpdateExpression(oracle.toplink.internal.helper.DatabaseTable table, Expression mainExpression, DatabaseRow transRow, DatabaseRow modifyRow)INTERNAL: This method must be included in any locking policy. |
java.lang.Object |
clone()INTERNAL: Clone the policy |
java.lang.Object |
getValueToPutInCache(DatabaseRow row, oracle.toplink.publicinterface.Session session)INTERNAL: Return the value that should be stored in the identity map. |
int |
getVersionDifference(java.lang.Object currentValue, java.lang.Object domainObject, java.util.Vector primaryKeys, oracle.toplink.publicinterface.Session session)INTERNAL: Return the number of version difference between the two states of the object. |
java.lang.Object |
getWriteLockValue(java.lang.Object domainObject, java.util.Vector primaryKey, oracle.toplink.publicinterface.Session session)INTERNAL: This method will return the optimistic lock value for the object |
void |
initialize(oracle.toplink.publicinterface.Session session)INTERNAL: It is responsible for initializing the policy; |
void |
initializeProperties()INTERNAL: It is responsible for initializing the policy; |
boolean |
isChildWriteLockValueGreater(oracle.toplink.publicinterface.Session session, java.util.Vector primaryKey, java.lang.Class original, oracle.toplink.internal.sessions.ObjectChangeSet changeSet)INTERNAL: |
boolean |
isChildWriteLockValueGreater(oracle.toplink.publicinterface.UnitOfWork uow, java.util.Vector primaryKey, java.lang.Class original)INTERNAL: |
boolean |
isNewerVersion(DatabaseRow databaseRow, java.lang.Object domainObject, java.util.Vector primaryKey, oracle.toplink.publicinterface.Session session)INTERNAL: Compares the value from the row and from the object (or cache). |
boolean |
isNewerVersion(java.lang.Object currentValue, java.lang.Object domainObject, java.util.Vector primaryKey, oracle.toplink.publicinterface.Session session)INTERNAL: Compares the value and the value from the object (or cache). |
void |
mergeIntoParentCache(oracle.toplink.publicinterface.UnitOfWork uow, java.util.Vector primaryKey, java.lang.Object object)INTERNAL: Only applicable when the value is stored in the cache. |
void |
registerObjectIntoParentCache(oracle.toplink.publicinterface.UnitOfWork uow, java.util.Vector primaryKey, java.lang.Object original)INTERNAL: Update the parent write lock value if the unit of works has been incremented. |
void |
setDescriptor(Descriptor descriptor)INTERNAL: Set method for the descriptor |
void |
setupWriteFieldsForInsert(ModifyQuery query)INTERNAL: Put the initial writelock value into the modifyRow. |
void |
updateRowAndObjectForUpdate(ModifyQuery query, java.lang.Object domainObject)INTERNAL: Nothing to do because all updates are handled by the application |
void |
validateDelete(int rowCount, java.lang.Object object, DeleteObjectQuery query)INTERNAL: Check the row count for lock failure. |
void |
validateUpdate(int rowCount, java.lang.Object object, WriteObjectQuery query)INTERNAL: Check the row count for lock failure. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FieldsLockingPolicy()
| Method Detail |
public void addLockFieldsToUpdateRow(DatabaseRow databaseRow,
oracle.toplink.publicinterface.Session session)
addLockFieldsToUpdateRow in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicypublic abstract void addLockValuesToTranslationRow(ObjectLevelModifyQuery query)
addLockValuesToTranslationRow in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicypublic Expression buildDeleteExpression(oracle.toplink.internal.helper.DatabaseTable table, Expression mainExpression, DatabaseRow row)
buildDeleteExpression in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicypublic Expression buildUpdateExpression(oracle.toplink.internal.helper.DatabaseTable table, Expression mainExpression, DatabaseRow transRow, DatabaseRow modifyRow)
buildUpdateExpression in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicypublic java.lang.Object clone()
clone in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public java.lang.Object getValueToPutInCache(DatabaseRow row,
oracle.toplink.publicinterface.Session session)
getValueToPutInCache in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public int getVersionDifference(java.lang.Object currentValue,
java.lang.Object domainObject,
java.util.Vector primaryKeys,
oracle.toplink.publicinterface.Session session)
getVersionDifference in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public java.lang.Object getWriteLockValue(java.lang.Object domainObject,
java.util.Vector primaryKey,
oracle.toplink.publicinterface.Session session)
getWriteLockValue in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicypublic void initialize(oracle.toplink.publicinterface.Session session)
initialize in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicypublic void initializeProperties()
initializeProperties in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public boolean isChildWriteLockValueGreater(oracle.toplink.publicinterface.Session session,
java.util.Vector primaryKey,
java.lang.Class original,
oracle.toplink.internal.sessions.ObjectChangeSet changeSet)
isChildWriteLockValueGreater in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public boolean isChildWriteLockValueGreater(oracle.toplink.publicinterface.UnitOfWork uow,
java.util.Vector primaryKey,
java.lang.Class original)
isChildWriteLockValueGreater in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public boolean isNewerVersion(java.lang.Object currentValue,
java.lang.Object domainObject,
java.util.Vector primaryKey,
oracle.toplink.publicinterface.Session session)
isNewerVersion in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public boolean isNewerVersion(DatabaseRow databaseRow,
java.lang.Object domainObject,
java.util.Vector primaryKey,
oracle.toplink.publicinterface.Session session)
isNewerVersion in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public void mergeIntoParentCache(oracle.toplink.publicinterface.UnitOfWork uow,
java.util.Vector primaryKey,
java.lang.Object object)
mergeIntoParentCache in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public void registerObjectIntoParentCache(oracle.toplink.publicinterface.UnitOfWork uow,
java.util.Vector primaryKey,
java.lang.Object original)
public void setDescriptor(Descriptor descriptor)
setDescriptor in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicypublic void setupWriteFieldsForInsert(ModifyQuery query)
setupWriteFieldsForInsert in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public void updateRowAndObjectForUpdate(ModifyQuery query,
java.lang.Object domainObject)
updateRowAndObjectForUpdate in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public void validateDelete(int rowCount,
java.lang.Object object,
DeleteObjectQuery query)
validateDelete in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
public void validateUpdate(int rowCount,
java.lang.Object object,
WriteObjectQuery query)
validateUpdate in interface oracle.toplink.internal.descriptors.OptimisticLockingPolicy
|
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||