Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
kwwong wong
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • 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 ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic