• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX:Question about searching criteria

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • 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?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic