Is it possible to add criteria using the ICriteria interface to an existing HQL query? We will have many cases where some web page will have an arbitrarily complex HQL query, to which the user can add additional criteria through textboxes, dropdowns, etc. We would like to avoid parsing the base HQL query, constructing HQL expressions as text, and inserting that text at the end of the original query's WHERE clause.
I've looked through the ICriteria interface, but it appears that you must start with a single persistent class, which is used to form an implicit, trivial "query" to which your criteria is added.
|