return descriptor.getObjectBuilder().buildObject(query, nestedRow, joinManger);
}
protected AbstractRecord buildCompositeRow(Object attributeValue, AbstractSession session, AbstractRecord parentRow) {
ClassDescriptor classDesc = getReferenceDescriptor(attributeValue, session);
XMLObjectBuilder objectBuilder = (XMLObjectBuilder) classDesc.getObjectBuilder();
XMLField xmlFld = (XMLField) getField();
if (xmlFld.hasLastXPathFragment() && xmlFld.getLastXPathFragment().hasLeafElementType()) {
XMLRecord xmlRec = (XMLRecord) parentRow;
xmlRec.setLeafElementType(xmlFld.getLastXPathFragment().getLeafElementType());
}
XMLRecord parent = (XMLRecord) parentRow;
boolean addXsiType = shouldAddXsiType((XMLRecord) parentRow, classDesc);
XMLRecord child = (XMLRecord) objectBuilder.createRecordFor(attributeValue, (XMLField) getField(), parent, this);
child.setNamespaceResolver(parent.getNamespaceResolver());
objectBuilder.buildIntoNestedRow(child, attributeValue, session, addXsiType);
return child;
}