• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Find by criteria

 
Angelo Russo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

this is my first post. I received the assignment from sun and it is the B & S Brooker tool.
The most important requirement would seem to be clarity in the face of complexity.

I already found many useful information on this forum.Information that allowed me to make some choices (eg recNo primary key).
but now I have a doubt about the method findByCriteria, This is the core of the method that I implemented
(with an explanation of my choice):



is a correct approach to have locked the resource (database) for the duration of the research? or too simple? or too little performance?
for a search that returns 3 records out of 28 takes about 3 milliseconds.
thanks to all.
Angelo.

 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Angelo,

Welcome to the JavaRanch!

I marked every method as synchronized, so also my findByCriteria: this is even simpler as yours and less performant.

And in my opinion explanations of your choices will need to end up in choices.txt, not in your actual code.

Kind regards,
Roel
 
Angelo Russo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks a lot Roel

I had already put the explanation in the file choise.txt.
Now remove it from the code, or at least reduce it.

Kind regards,
Angelo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic