• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NX: URLyBird 1.3.3 -- Problem on int [] find(String [] criteria) method

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I currently working on the SCJD assigment. I have the problem on the find method. The signature of the find method in DBMain as following:
public int [] find(String [] criteria)
throws RecordNotFoundException;
It return the array of the int only, not the records itself. So that I need to retrieve the record details from the result of the searching one by one. How can I to prevent other people to modify the records when I retrieving the records details? Should I lock the entire database records ?
[ July 21, 2003: Message edited by: kwwong wong ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, you don't need to lock all the records. Just retrieve them one by one. Even if another user modifies one of the records later.
Phantom reads and the like are not a requirement for this assignment.
Mark
reply
    Bookmark Topic Watch Topic
  • New Topic