This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes UpdateRecord and CreateRecord Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "UpdateRecord and CreateRecord" Watch "UpdateRecord and CreateRecord" New topic
Author

UpdateRecord and CreateRecord

Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
For CreateRecord/UpdateRecord, the key is the combination of
flag/hotel/location/occ/smoking/rate/date/owner.

But there could be multiple listing from the same hotel. How do track the DuplicateKey in this case.

Help!.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi Aruneesh,

Have you considered that you might not need to worry about it? Just because your method signature declares that you can throw a particular exception does not mean that you must throw it - you could leave it in the signature for future enhancements.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
My question is more to do with, what is the key supposed to be.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: UpdateRecord and CreateRecord
 
Similar Threads
Beta Question: synchronized methods
NX SCJD: but passed with 155/155
NX:Create/Delete invalid data
Data Integrity is broken
No definition of what is a DuplicateKeyException