// compare the column with the parameter
Predicate compare = column.equal(param);
// set the where clause into the query
dobj.where(compare);
// create a query instance
Query query = session.createQuery(dobj);
// set the parameter value
query.setParameter("name", "Employee number 8");
// get the results
List<Employee> results = query.getResultList();
// consistency check the results
consistencyCheck(results);
// verify we got the right instance
errorIfNotEqual("Wrong employee id returned from equal query: ",
8, results.get(0).getId());