record.setLastname("Rubble");
record.setId1(new Integer(2));
record.setId2(new Integer(3));
dao.insertMyObject(record);
MyObjectExample example = new MyObjectExample();
fn = new FirstName();
fn.setValue("B%");
example.createCriteria().andFirstnameLike(fn).andId2EqualTo(
new Integer(3));
fn = new FirstName();
fn.setValue("W%");
example.or(example.createCriteria().andFirstnameLike(fn));
example.setOrderByClause("ID1, ID2");
List answer = dao.selectMyObjectByExample(example);
assertEquals(2, answer.size());
MyObject returnedRecord = (MyObject) answer.get(0);
assertEquals(1, returnedRecord.getId1().intValue());
assertEquals(2, returnedRecord.getId2().intValue());