for (QueryResult qr : results.getPage(maxHits)) {
rtm.setColumnCount(Math.max(rtm.getColumnCount(), qr.getProperties().size()));
for (PropertyData<?> prop : qr.getProperties()) {
if (PropertyIds.OBJECT_ID.equals(prop.getId()) && (prop.getFirstValue() != null)) {
rtm.setValue(row, prop.getQueryName(), new ObjectIdImpl(prop.getFirstValue().toString()));
} else {
rtm.setValue(row, prop.getQueryName(), prop.getFirstValue());
}
}