tags:

views:

29

answers:

1

I have table column with expression filter applied. Is there any existing parser that would allow me to parse this column? the column can contain simple conditions such as

PROPERTY = 'name' AND PROPERTY2 = 'something else'

or more advanced like

(PROPERTY IN ('foo', 'bar') AND (PROPERTY IN ('foo1', 'bar2') OR OTHER_PROPERTY IN ('etc'))

It would totally suffice if it would return list of properties in expression and either value (in case of = operator) or list of all values (even if one property appears more than once in expression). Is there such parser available or do I have to write it myself?

A: 

I don't know how you are developing your project. But if your are using hibernate you can use criteria queries. Cirteria queries

Tito