// basically a BaseBookPeer.setDbName(criteria);
// and BasePeer.doSelect(criteria);
CompositeMapper mapper = new CompositeMapper();
mapper.addMapper(new BookRecordMapper(), 0);
mapper.addMapper(
new AuthorRecordMapper(),
BookPeer.numColumns);
List<List<Object>> queryResult
= BookPeer.doSelect(criteria, mapper);
List<Object> mappedRow = queryResult.get(0);