@Inject private SomeParentDAO someParentDAO;
In your façade method, code a variable to hold an instance of the entity interface, and set its value by calling.get() on the DAO, passing the key of the database row:
// retrieve the instance of the parent entity final SomeParent someParent = someParentDAO.get(key.someParentID);
Now code a call to the appropriate getter on the parent entity instance to retrieve its child entity instances:
// retrieve all the child instances of the entity for this parent final Set<SomeChild> someChildren = someParent.getSomeChildren();
Now code a loop which iterates the set retrieved, and maps each instance to the client struct:
// map the details returned for (final SomeChild someChild : someChildren) { final SomeChildSummaryDetails someChildSummaryDetails = new SomeChildSummaryDetails(); someChildSummaryDetails.someChildID = someChild.getID(); someChildSummaryDetails.name = someChild.getName(); list.details.addRef(someChildSummaryDetails); }