wood burning stoves*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes It must allow the user to search the data for all records... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "It must allow the user to search the data for all records..." Watch "It must allow the user to search the data for all records..." New topic
Author

It must allow the user to search the data for all records...

Stefan Taranu
Greenhorn

Joined: Feb 06, 2009
Posts: 22
Hi guys,

I'm having trouble interpreting what Sun is trying to say.
I have this: It must allow the user to search the data for all records.... One can interpret this as to have a button that will populate your JTable with all the data in the database (which might not be so efficient...).
I implemented the 48 hours rule - so when clicking on the search button only the rooms that have the start date within 48 hours will be retrieved from the DB. Do you think it's OK?

How did you interpret this phrase?

Regards,
Stefan


Stefan
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5514
    
  13

Hi Stefan,

My implementation of the search requirements:
  • 2 text fields (one for hotel name, one for location)
  • if you leave both fields empty and click the search-button, all valid (not deleted) records are shown in the JTable
  • no implementation of the 48 hours rule

  • If the database grows and grows, this approach is indeed not that efficient: a lot of redundant records will be loaded into your table. I used a record cache, so if the database is really huge I'll ran into memory problems. I addressed that in my choices.txt and one of the solutions I suggested was implementing the 48 hours rule (only loading the records in cache with an available night within 48 hours).

    So I think you'll be fine with your implementation/approach, certainly if you mention something about it in your decision document.

    Kind regards,
    Roel


    SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
    http://www.javaroe.be/
    Stefan Taranu
    Greenhorn

    Joined: Feb 06, 2009
    Posts: 22
    Hi Roel,

    That was reaaaaally fast . Thanks a lot for your answer. I will justify my interpretation in choices.txt

    Regards,
    Stefan
    Roel De Nijs
    Bartender

    Joined: Jul 19, 2004
    Posts: 5514
        
      13

    Stefan Taranu wrote:
    That was reaaaaally fast .

    That's why my middle name is "The Fast and The Furious"
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: It must allow the user to search the data for all records...