Let's start with few simple classes (Employer and Employee) mapped to database tables. We'll use those in future examples.
Let say we have to find Employees and Employers using different search criteria. For all examples I assume that helper method getCurrentSession() returns Hibernate's session and each code fragment is running within transaction.
1) Find all Employees with name "Tom" (the easiest one).
2) Find all Employers which don't have any Employees.
3) Find all Employers which have Employees with name "Tom".
4) For this example let me introduce another table "black_list" and BlackListEntry entity mapping.
The purpose of this entity is pretty simple: a black list of e-mail addresses. Those should be exclude from any mailing lists. Let's find all Employees whose e-mails are in that black list.
That's it. :-)