For this functionallity, Hibernate is probably not the righ tool.
Since you apparently want to retrieve different columns for each request, my suggestion would be to create a custom class that take a hash-map as parameter defining which columns to retrieve and what condition should be set for that column.
Then you could generate your own SQL-statement , execute it, and parse up the result anyway you want (Set of Object-arrays, vectors or any matrix you would feel comfortable reading from to present).
As notet at the last page in Hibernate In Action :
Quote:
Finally, use SQL, JDBC, and stored procedures for the 5 percent of use cases you
can’t implement with Hibernate, such as mass data manipulation or complex
reporting queries with vendor-specific SQL functions.