I think this has the Hibernate Criteria API all over it. You can use the Criteria API to create very complicated queries based on your objects, not tables. Remember, Hibernate is all about thinking about your problem domain in the form of your object model, not the underying tables.
Here's a fun little tutorial on the Hibernate3 Criteria API.
http://jpa.ezhibernate.com/Javacode/learn.jsp?tutorial=09howtousethecriteriaapi
Give it a read, and tell us what your objects are that you are using. Then maybe we can help you do a Criteria query with these objects.