Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update on deleted record

 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wondered what decision everyone else has made about calling update on a record marked as deleted?
 
Sam Codean
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deleted record cannot be updated!!!
Read the Comments on the DBMain interface clearly
[ November 16, 2006: Message edited by: Sam Codean ]
 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there's nothing in the spec that explicitly says we can't update a deleted record.
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats what a RecordNotFoundException is thrown for, any attempt to update, read or delete a non existent record
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi


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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic