Criteria matching in Java
865638Jun 1 2011 — edited Jun 1 2011Looking for some assistance in designing a solution. Currently have a criteria matching engine, written in Java, which has a series of criteria held in a database table, which it attempts to match at runtime to fields extracted from a Java object. The criteria record consists of a series of regexps, the engine takes the fields from the object and construts an SQL call which makes use of the Oracle REGEXP_LIKE function, so all of the matching is really delegated to Oracle specific database functionality. I need to make this work using ANSI SQL to support any database, so using something like REGEXP_LIKE is not possible in the future.
Does anyone have any suggestions for a possible approach, are there any open-source libraries or tools that provide this kind of matching functionality? I had thought of using something like Drools but I would prefer to stick with table based criteria and I'm not sure if Drools would easily work this way.