Here’s a sketch:
YourClass foo = new YourClass();
foo.setSomeAttribute(“examplevalue”);
List myList = dao.findByExample(foo);
Note that findByExample ONLY works on attributes for the class you’re retrieving, NOT relations and apparently not ID members.
Any attributes you leave as null will be treated as “don’t cares” in the retrieval. You can retrieve ALL the objects by doing the degenerate case of:
YourClass foo = new YourClass();
List myList = dao.findByExample(foo);