How do I create a dynamic WHERE clause for a finder method? I am trying to search a table based on one or more parameters that the user enters.
So, the query might be where (Attribute=NAME AND Value LIKE 'x%') OR (Attribute=ID AND Value LIKE 'y%'). The Attribute/Value clauses are dynamic and determined by the user through a search interface.
I can dynamically build the Attribute/Value WHERE clause programmatically, but how do I pass it into a finder method? Is this even the right approach?
You need DynamicQL, which is covered in the JBossCMP documentation available from FlashLine ($10).