• 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:Question about searching criteria

 
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the assignment, above the find(String [] criteria), there is "flexible searching..." something, so should my find(String [] criteria) provide some special functions, e.g. if you're searching the price of the room, should it be able for you to select a range like $100 - $200, or just get the exact user input price? Also the Smoke field, there're only 2 possibility: Y or N, do I have to use a ComboBox, and only provide these two option?
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi HaoZhe,
I guess you are talking about the requirement "A data access system that provides record locking and a flexible search mechanism".
Personally I would read that as requiring you to allow some flexibility on what fields are being searched.
If you have hard coded your search mechanism to only search on the property name as parameter one and the location as parameter two, then it is not very flexible: it would require recoding if someone wanted to search on a third parameter; and more recoding if they then went to four parameters. And so on.
There are ways that you can specify the input to your find so that it does not matter which field(s) the user wants to search on - your server will be able to handle that request. That is pretty flexible
Of course the client software you write will only want to search on two of the possible fields - but some client software written by someone else may want the flexibility to do other searches.
Regards, Andrew
 
reply
    Bookmark Topic Watch Topic
  • New Topic