File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes case sensitive or not 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 "case sensitive or not" Watch "case sensitive or not" New topic
Author

case sensitive or not

Mike Ngo
Ranch Hand

Joined: Oct 16, 2006
Posts: 89
must allow the user to search for records where the name and/or location fields exactly match values specified by the user


How do you interpret this? exact match means "Fred" matches
1) "Fred" and "fred" (case-insensitive).
2) "Fred" only (case-sensitive)

I think #1 makes more sense in real-world app but I am afraid of the word "must". Can I justify it in choices.txt?
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
Originally posted by Mike Ng:


How do you interpret this? exact match means "Fred" matches
1) "Fred" and "fred" (case-insensitive).
2) "Fred" only (case-sensitive)

I think #1 makes more sense in real-world app but I am afraid of the word "must". Can I justify it in choices.txt?


I'm definately in the #1 camp with you mike. I think that a CSR would want to be able to just type in a few letters to do a quick search on behalf of someone who wishes to book a room. I just can't see how a case sensitive search is the least bit useful. I do also fear the work must however.

My search function is by default a case insensitve 'starts with' search. I provide the option to turn on both the case sensitive and exact match options if some user is crazy enough to actually want that .

This satisfies the requirements while being more user friendly, as it does allow the user to for records where the name and/or location fields exactly match values specified by the user. Just not by default. I would be very suprised if this resulted in a failure ( and very confident of an appeal too!)

Alot of people do seem to have the case sensitive / exact match approach though just to be on the safe side. But I'm with you in the #1 camp for sure.

regards,
Mark


SCJP<br />SCJD
Mike Ngo
Ranch Hand

Joined: Oct 16, 2006
Posts: 89
I provide the option to turn on both the case sensitive and exact match options if some user is crazy enough to actually want that


I think this did the trick

That would cover all bases.
[ November 28, 2006: Message edited by: Mike Ng ]
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
The requirements doc talks about an exact match. That means case sensitive to me.


42
Mike Ngo
Ranch Hand

Joined: Oct 16, 2006
Posts: 89
I look at the low-level api findByCriteria() and from the description, it seems to be case-sensitive. So unless you extends the interface, case insensitive search can't be done.
I am going to stick with my current implementation (case-sensitive).
Mark Smyth
Ranch Hand

Joined: Feb 04, 2004
Posts: 288
I have it implemented my find by criteria as a case insensitive search. Either way I don't think it matters too much which way one decides to do it once it gets a mention in the choices.txt file. I've never heard of any failure issues on this particular point.

Mark.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: case sensitive or not