This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Does Criteria checks for equal, ignoring case? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Does Criteria checks for equal, ignoring case?" Watch "Does Criteria checks for equal, ignoring case?" New topic
Author

Does Criteria checks for equal, ignoring case?

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
Hello

See my code below:



The above code checks db for address value equal to tme.getAddress(). If found, prints "Already Exists", else inserts it into database.

Suppose, if there is a value 'Mumbai; in db, and 'tme.getAddress' has String 'mumbai'. It will be inserted. What i want is that it should check for address ignoring case.

How should i proceed?


kunal
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
The problem has been solved by using ".ignoreCase()" method.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does Criteria checks for equal, ignoring case?
 
Similar Threads
Autoboxing with equal method
simple question regarding strings
Strings' Puzzle!
equal/== help
please explain me the output of the following programs