Originally posted by Anthony Watson:
Should I provide an empty implementation of the method? Should I label it as deprecated and suggest using a method such as updateRecordSafe instead?
Antony,
Both the above options are risky.
My instructions say that the functionality of the update() method is to modify the fields of the record in the database only, if the cookie supplied is the cookie that was used to lock the record before.
Which means that when the update() method is called, the record is already in a locked state by the client.
Probably your instructions also may mean the same thing.
"lock record, see if it has changed, update record, unlock record"...
- could be the list of methods called in the booking use case and
not for the update() method in the Data() class. So I would say....
for the booking use case:
"read client record, lock record, see if it has changed, update record, unlock record."
for the update() method in the Data() class:
"do recNo validation, do cookie validation, update the record."