/** * Build and return the expression to use as the where clause to an update object. * The row is passed to allow the version number to be extracted from it. */ public Expression buildUpdateExpression(DatabaseTable table, AbstractRecord transactionRow, AbstractRecord modifyRow) { // Only the first table must use the lock check. Expression primaryKeyExpression = buildPrimaryKeyExpression(table); if (this.descriptor.usesOptimisticLocking()) { return this.descriptor.getOptimisticLockingPolicy().buildUpdateExpression(table, primaryKeyExpression, transactionRow, modifyRow); } else { return primaryKeyExpression; } }
/** * Build and return the expression to use as the where clause to an update object. * The row is passed to allow the version number to be extracted from it. */ public Expression buildUpdateExpression(DatabaseTable table, AbstractRecord transactionRow, AbstractRecord modifyRow) { // Only the first table must use the lock check. Expression primaryKeyExpression = buildPrimaryKeyExpression(table); if (this.descriptor.usesOptimisticLocking()) { return this.descriptor.getOptimisticLockingPolicy().buildUpdateExpression(table, primaryKeyExpression, transactionRow, modifyRow); } else { return primaryKeyExpression; } }
/** * Build and return the expression to use as the where clause to an update object. * The row is passed to allow the version number to be extracted from it. */ public Expression buildUpdateExpression(DatabaseTable table, AbstractRecord transactionRow, AbstractRecord modifyRow) { // Only the first table must use the lock check. Expression primaryKeyExpression = buildPrimaryKeyExpression(table); if (this.descriptor.usesOptimisticLocking()) { return this.descriptor.getOptimisticLockingPolicy().buildUpdateExpression(table, primaryKeyExpression, transactionRow, modifyRow); } else { return primaryKeyExpression; } }