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.
I added another interface, MyDBAccess, that extends DBAccess, and had Data implement both of them. I add any additional functionality to MyDBAccess. Hope this helps. I am stuck on findByCriteria(String criteria) right now myself.
posted 12 years ago
Didu have a separate method of find in your new interface. Let me know what your additional interface is doing.
Also if you need help in findByCriteria(), let me know
My cellmate was this tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps