hazelcast/hazelcast — pull request #1326 by jerrinot (2013-12-05 10:48:46+00:00)
Title: case insensitive LikePredicate

HI it's an attempt to improve the PR https://github.com/hazelcast/hazelcast/pull/1268

I'm not sure if this is the best approach, I'm pasting here my comments from the original PR:

* the new field breaks compatibility when serialized/deserialized
* the enum Option is defined inside the LikePredicate. There would be the same enum for RegexPredicate, etc. That's not nice, but from the other hand, I'm not sure if having a global Option enum would be any better
* the enum itself is probably overkill now, but I don't like the idea of having boolean argument for this as number of options might grow in the future

The alternative approach might a new class ILikePredicate (subclass of LikePredicate?). I'm not sure if it's better. It would solve the problem with (backward) compatibility.

I'm not particularly happy that implementations of Predicate interface are public, the static factory methods inside the Predicates class would probably be enough, but I understand it's not feasible to make them private now.