Hi All,
I want to allow clients to safely pass in arbitrary where clause filters which I could append to a Criteria query. I would use/enable filters on the Session so that clients can't break out of visibility enforced on that level.
Could I perhaps have clients pass in a where clause fragment in HQL and somehow translate that into a Criterion object to append to my Criteria query? Is there a way to take an HQL where clause fragment and build Criteria query expressions from them?
Is this possible, or am I approaching this the wrong way? How does one expose Criterion building over a JSON/XML in a generic, reusable way?
Thanks,
Frank Grimes
|