Hello all, I'm doing B&S assignment, and have the following interface:
Maybe i'm missing something, but findByCriteria() returns a list of record numbers, which i can't return to the client, so i guess i'll have to do a readRecord() of all the records using that long, but i've just physically read all of them to do the findByCriteria()! Seems like a waste. What am i missing?
The readRecord(long recNo) method will come handy if a client knows which record to display. I use this method in delete and update. If a client attempt to delete record n, the client can display record n before deleting it, this way it ensures no records will be deleted by mistake.
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Joined: Sep 25, 2003
You could call readRecord in findByCriteria to get a record's data to compare to the criteria array.