my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX B&S: find method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX B&S: find method" Watch "NX B&S: find method" New topic
Author

NX B&S: find method

lydie prevost
Ranch Hand

Joined: Mar 14, 2002
Posts: 32
Hi everybody,
Can somebody help me understand this find method.
I see people recommending to use some king of getAllRecord from the database/cache and they seem to say that it is better than going through the method read ( to read the records one by one).
But how do they know if the record has been deleted or not?
They also still need to read the record anyway to do their searches.
So I don't really understand how to avoid reading all the record one by one!
May be the solution would be to store all the record in a cache/arrayList or something like that when the database is created?
Is this the way to go?
The way to do the find (for me) seems to be conected to the use of an cache is it? Can you help me clarify this method I am all confused.
Thank ypu
- Lydie
YungSheng Chang
Ranch Hand

Joined: Jul 28, 2003
Posts: 44
Hi,
Using Data Cache or not is a desgin choice, and you should clearly describe your consideration in design documnet.
I choose to use it and the reason is to improve the reading performance. But it is not neccessary to do so.
Find has nothing to do with this consideration. To implement find method, you may need some other assistant method, such as getAllRecords(), getNumberOfRecords(). If you use data cache, it will be very easy to implement those methods.
What is important for the finding method is weather you clearly consider all scenario and code reuse. Weather you use data cache or not is ok.


I play Java for fun.<br /> <br />SCJP / SCJD / SCWCD / SCBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NX B&S: find method