/** * Check if a database record was changed in the database. */ private final void checkIfChanged(int result, BigInteger version, Timestamp timestamp) { // [#1596] If update/delete was successful, update version and/or // timestamp columns. // [#673] Do this also for deletions, in case a deleted record is re-added if (result > 0) { setRecordVersionAndTimestamp(version, timestamp); } // [#1596] No records were updated due to version and/or timestamp change else if (isExecuteWithOptimisticLocking()) { throw new DataChangedException("Database record has been changed or doesn't exist any longer"); } } }
/** * Check if a database record was changed in the database. */ private final void checkIfChanged(int result, BigInteger version, Timestamp timestamp) { // [#1596] If update/delete was successful, update version and/or // timestamp columns. // [#673] Do this also for deletions, in case a deleted record is re-added if (result > 0) { setRecordVersionAndTimestamp(version, timestamp); } // [#1596] No records were updated due to version and/or timestamp change else if (isExecuteWithOptimisticLocking()) { throw new DataChangedException("Database record has been changed or doesn't exist any longer"); } }
setRecordVersionAndTimestamp(version, timestamp);