public void initializePartnerLinks(Long parentScopeId, Collection<? extends PartnerLinkModel> partnerLinks) {
if (ODEProcess.__log.isTraceEnabled())
ODEProcess.__log.trace(ObjectPrinter.stringifyMethodEnter("initializeEndpointReferences", new Object[] {
"parentScopeId", parentScopeId, "partnerLinks", partnerLinks }));
ScopeDAO parent = _dao.getScope(parentScopeId);
for (PartnerLinkModel partnerLink : partnerLinks) {
PartnerLinkDAO pdao = parent.createPartnerLink(partnerLink.getId(), partnerLink.getName(),
partnerLink.getMyRoleName(), partnerLink.getPartnerRoleName());
// If there is a myrole on the link, initialize the session id so it is always
// available for opaque correlations. The myrole session id should never be changed.
if (partnerLink.hasMyRole()) pdao.setMySessionId(new GUID().toString());
}