aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 618
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: 618
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
equal/== help
simple question regarding strings
Strings' Puzzle!
please explain me the output of the following programs
Autoboxing with equal method