ObjectBuilder builder = query.getDescriptor().getObjectBuilder();
if (this.mechanism == null) {
results = (List)session.executeQuery(query, translationRow);
for (Object eachReferenceObject : results) {
Object eachReferenceKey = extractKeyFromReferenceObject(eachReferenceObject, session);
referenceObjectsByKey.put(eachReferenceKey, builder.wrapObject(eachReferenceObject, session));
}
} else {
ComplexQueryResult complexResult = (ComplexQueryResult)session.executeQuery(query, translationRow);
results = (List)complexResult.getResult();
List<AbstractRecord> rows = (List)complexResult.getData();