aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX:Question about searching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX:Question about searching" Watch "NX:Question about searching" New topic
Author

NX:Question about searching

HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
I'm still not clear with the searching requirement:
"It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user."
for the first sentence, does it mean the user doesn't input anything and the result is all records?
for the second case, does it mean the user can specify the name(Hotel Name) and location(City) fields? Only these two?
and for the "exactly match", does it mean case sensitive, and exact value like Fair does not match Fairfield? If it is, why is there in the other part of the instruction, above the find() method of the DBMain interface, there is an example: "Fred" matches "Fred" or "Freddy"?


[url]Olnex.net[/url]
[SCJP 1.2, SCJD, SCWCD]
Dave Knipp
Ranch Hand

Joined: Oct 14, 2003
Posts: 146
Hi,
for the first sentence, does it mean the user doesn't input anything and the result is all records?

Yes
for the second case, does it mean the user can specify the name(Hotel Name) and location(City) fields? Only these two?

This means that to successfully search and return any matches that the user must type in a query that exactly matches the hotel's name and city. So if they typed 'Billy's Hotel Chicago' only records with the name 'Billy's Hotel' and the city 'Chicago' would be shown to the user. The user could also search just on 'Billy's Hotel' or on 'Chicago' and return matching results as well.
and for the "exactly match", does it mean case sensitive, and exact value like Fair does not match Fairfield?

Correct. It would match on the server side though, but as far as the client is concerned it does not.
If it is, why is there in the other part of the instruction, above the find() method of the DBMain interface, there is an example: "Fred" matches "Fred" or "Freddy"?

I had the same question at first as well. I think that sun is just trying to make your server implementation flexible and then requiring you to do another level of filtering for the client side.
Regards,
Dave
[ December 22, 2003: Message edited by: Dave Knipp ]

SCJP 1.4, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, IBM Certified Solution Developer -WebSphere Studio V5.0
Seid Myadiyev
Ranch Hand

Joined: Jul 02, 2002
Posts: 196
Hello Dave,
Could you please explain a little more in details what you mean by this:
"Correct. It would match on the server side though, but as far as the client is concerned it does not."
Thank you!
Seid
HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
I think he means if you compare "Fred" with "Freddy", the server will return an match signal, but you should avoid it (or filt it) on your client side. Am I right?
But there's a new problem: this is in networked mode, what about non-networked mode?
HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
I don't quite understand, forgive my English.
Do you mean the user can only specify the hotel's name and/or the location? (The user cannot specify any other field such like Smoking Size etc?)
Thank you!
Jim DiCesare
Greenhorn

Joined: Nov 23, 2003
Posts: 14
I took exactly match to mean case sensitive, Fred matching Fred or Freddy to mean that the field starts with the criteria given..so "Fred" does not match "The Place of Fred" as far as I'm concerned. These were the specifications in the databse interface, so I implemented this server side in my database, and I do some basic input assistance in my GUI (like trim and some bad input handling).
Hope this helps
Jim DiCesare
Greenhorn

Joined: Nov 23, 2003
Posts: 14
Oh, and I only allowed searching by name and location to minimize the possibility of error, and amount of work. I think in general it is best to meet the minimum requirements, but fulfill them completely. I also only allow renting and returning from the GUI, even though create, update, etc are implemented in my database.
 
wood burning stoves
 
subject: NX:Question about searching