From: Andrea A. <aa...@op...> - 2007-08-02 07:28:14
|
Tim Englich ha scritto: > Hello, > > I am searching for a possibility to use the LikeFilter caseinsensitiv > serveral times. > I am using the GeoTools 2.3.1 release. > I didn't find a possibility yet. > Has anyone an idea how I can do this? With the current code you cannot, afaik. You could try to roll your own case insensitive likefilter by subclassing LikeFilterImpl I guess, but then you would also have to alter the sql filter encoders to generate a case insensitive matching sql code (I don't think the sql92 standard allows for this, but some database might), otherwise the sql encoders would keep on encoding the case sensitive version. Alternatively, I think you can create a new filter function, FilterFunction_strToUpperCase, register it in the SPI subystem (look how other filter functions are registered in the text files in META-INF) and then upcase before doing like. Beware that doing so will mean the filter won't be passed anymore to the eventual database, since the datastore would not be able to encode the toUpperCase function. Hope this helps Cheers Andrea |