Patent ID: 7702658
Filing Date: 2010-04-20
Classification: G06F,Y10S

Abstract:
1. A computer implemented method for providing optimistic locking in a database containing a plurality of data records, comprising: providing a variable optimistic locking value for each data record; providing an optimistic locking programming class; during a database transaction, creating an optimistic locking instance of the optimistic locking programming class for a selected data record, the optimistic locking instance including: preparing a database operation SELECT statement for the selected data record, wherein the prepared database operation SELECT statement includes a database operation statement parameter clause including the database operation clause fragment returned by the optimistic locking instance for the selected data record; executing the prepared database operation SELECT statement resulting in a result set; determining whether the result set is empty; when the result set is not empty, calling the set current value procedure; when the result set is empty, determining whether the database operation clause fragment procedure returned an empty string; and when the database operation clause fragment procedure did not return an empty string, throwing an exception.