}
// Build the dependent message parts map for the referenced message.
mapping.buildDependentMsgPartsMap(ref.getRefPart());
Pair localAssocPath = null;
// Copy the dependency list from the referenced part to the referee while appending to the association paths.
for (CompositeMessagePart partToResolve = ref; partToResolve != null; partToResolve = partToResolve.getParent())
{
ObjectMessagePartMapping partParentMapping = (ObjectMessagePartMapping)partToResolve.getMapping();
if (mapping.getDependentMessagePartsCount() > 0)
{
for (Lookup.Iterator itr = mapping.getDependentMessagePartsIterator(); itr.hasNext();)
{
CompositeMessagePart part = (CompositeMessagePart)itr.next();
boolean bRoot = (partToResolve == rootPart);
// skip itself, however add to root even if the delete flag is not set on it
if (partToResolve != part && (partParentMapping.isDelete() || bRoot))
{
partParentMapping.addAssociationPath(part, Pair.append(localAssocPath, (Pair)itr.getValue()),
bRoot);
}
}
}
if (partParentMapping != null && partParentMapping.getAttribute() != null) // skip root
{
localAssocPath = new Pair(partToResolve, localAssocPath);
}
}
}
}