OptimisticLockingPolicy policy = descriptor.getOptimisticLockingPolicy();
policy.addLockValuesToTranslationRow(writeQuery);
if (!getModifyRow().isEmpty() || shouldModifyVersionField.booleanValue()) {
// Update the row with newer lock value.
policy.updateRowAndObjectForUpdate(writeQuery, object);
} else if (!shouldModifyVersionField.booleanValue() && (policy instanceof VersionLockingPolicy)) {
// Add the existing write lock value to the for a "read" lock (requires something to update).
((VersionLockingPolicy)policy).writeLockValueIntoRow(writeQuery, object);
}
}