* reference descriptor will wrap the object in an XMLRoot if required, and the
* object will be added to the given Container Policy if it is non-null.
*/
protected Object buildObjectAndWrapInXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy) {
ObjectBuilder builder = referenceDescriptor.getObjectBuilder();
Object objectValue = builder.buildObject(query, nestedRecord, joinManager);
if (converter != null) {
objectValue = converter.convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller());
}
Object updated = ((XMLDescriptor) referenceDescriptor).wrapObjectInXMLRoot(objectValue, next.getNamespaceURI(), next.getLocalName(), next.getPrefix(), false);
if (containerPolicy != null) {