Searching case insensitively using view criteria
This recipe shows you a technique that you can use to handle case-insensitive (or case sensitive for that matter) searching for strings, when using view criteria for a view object. The framework provides various methods, such as setUpperColumns()
and isUpperColumns()
, for instance, at various view criteria levels (ViewCriteria, ViewCriteriaRow
and ViewCriteriaItem)
that can be used to construct generic helper methods to handle case searching. This technique can be used to allow case-insensitive or case-sensitive searches in your application based on some controlling user interface component or some application configuration option. For instance, a custom search form can be constructed with a checkbox component indicating whether the search will be case sensitive or not.
Getting ready
You will need to have access to the shared components workspace that was developed in the Breaking up the application in multiple workspaces recipe in Chapter...