I did the find by Criteria. As name and the location are the fields to put the search on , so there are number of records returned and name and location are repeated in many records.
Now update starategy.
The user clicks one of the record which he wants , I'll store all the fields in an array and find the record by find method(not findByCriteria as this time we have more fields)
My question is here can I add another find method in Data.java, which is not mentioned in the DBAccess inteface, I think we can but just watned to be sure and want your opinion.
After finding the record I'll lock the record and do the find again and match with the old values to be sure that the record has not been changed.
The lock method will generate the Lock cookie with which I'll call the update method. What this lock cookie is for by the way. Are we suppose to store it somewhere other than calling the update(). Please comment
When the record is matched then I do the update or book it with CustomerID.
the last method would be to unlock.
Please suggest about my understanding
Any advice is appreciated