//q.setOrdering("name ascending");
Collection results = (Collection) q.getResultList();
assertEquals(2, results.size());
Iterator itr = results.iterator();
EagerOuterJoinPC pc = (EagerOuterJoinPC) itr.next();
assertEquals("1", pc.getName());
if ((empty & 1) > 0)
assertEquals(pc.getStringCollection().toString(),
0, pc.getStringCollection().size());
else {
assertEquals(pc.getStringCollection().toString(),
2, pc.getStringCollection().size());
assertTrue(pc.getStringCollection().contains("1.1"));
assertTrue(pc.getStringCollection().contains("1.2"));
}
pc = (EagerOuterJoinPC) itr.next();
assertEquals("2", pc.getName());
if ((empty & 2) > 0)
assertEquals(pc.getStringCollection().toString(),
0, pc.getStringCollection().size());
else {
assertEquals(pc.getStringCollection().toString(),
2, pc.getStringCollection().size());
assertTrue(pc.getStringCollection().contains("2.1"));
assertTrue(pc.getStringCollection().contains("2.2"));
}
assertTrue(!itr.hasNext());
pm.close();
}