This is more of a design than implementation question and it\'s going to be long so bear with me. It\'s best explained with an example:
Let\'s say I have a business
Hibernate is a low-level infrastructure framework, and as such should remain hidden behind the scenes. If next month your application needs to switch to another ORM framework for some reason, your API will be useless. Encapsulation even between layers within the same application, is vitally important.
Having said all this, I think your method should receive an abstraction of the information you need to perform the search. I advise you to create an enum of Product
's fields, and implement one or two simple versions of Restriction.
The parameters to the method can be a list of equality restrictions, another list of relative restrictions and of course an order indicator (one of the enum values plus a flag for asc/desc).
This is just a general direction, I hope I made my point clear =8-)