posted 15 years ago
Hi,
What is your interpretation of the record number ?
Considering the definition of the RecordNotFounException that I have received in my specifications : "Any methods that throw RecordNotFoundException should do so if a specified record does not exist or is marked as deleted in the database file.", the record number is the index of a record in the file, not taking care if the record is deleted or not.
So, it can happen that in database i have the first , let's say, 9 elements deleted, the 10'th element valid, in which case the read method will throw RecordNotFoundException for record numbers from 0 to 8 but read(9) will return the only record that is valid. Should not be more natural when the record number will be index the valid records in the database ? But in this case, throwing RecordNotFoundException from the read method will make no sense .... because internally I will read only valid records.
Please help ...
Thanks,
Liviu
Oracle Certified Master Java SE6 Developer(SCJD),
OCE JEE 6 JSP and Servlets Developer,
Java EE6 Java Server Faces Developer.