File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Update on deleted record Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Update on deleted record" Watch "Update on deleted record" New topic

Update on deleted record

Keith Jones
Ranch Hand

Joined: Oct 30, 2006
Posts: 105
Just wondered what decision everyone else has made about calling update on a record marked as deleted?

SCJP 1.4
Sam Codean
Ranch Hand

Joined: Feb 26, 2006
Posts: 194
Deleted record cannot be updated!!!
Read the Comments on the DBMain interface clearly
[ November 16, 2006: Message edited by: Sam Codean ]

-Sam Codean<br />SCJP 1.4 (98%)<br />SCJD 5.0 (87.5%)
Keith Jones
Ranch Hand

Joined: Oct 30, 2006
Posts: 105
there's nothing in the spec that explicitly says we can't update a deleted record.
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Thats what a RecordNotFoundException is thrown for, any attempt to update, read or delete a non existent record

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918


Any methods that throw RecordNotFoundException should do so if a specified record does not exist or is marked as deleted in the database file.

I extract this from my specification, I think it needs no extra comments.

Regards M

I agree. Here's the link:
subject: Update on deleted record
It's not a secret anymore!