private Map mergeWithParent(Map cMap){
  String ct=getClientType(cMap);
  String parentId=getParentID(cMap);
  Map rMap=cMap;
  Map pMap=null;
  OrderedSet os=new OrderedSet();
  while ((parentId != null) && (!ct.equals(parentId))) {
    pMap=(Map)mergedClientData.get(parentId);
    if (pMap == null) {
      debug.error(CLASS + "clientdata null for: " + parentId);
      rMap=null;
      break;
    }
    rMap=mergeMap(pMap,cMap);
    os.add(parentId);
    cMap=rMap;
    ct=getClientType(pMap);
    parentId=getParentID(pMap);
  }
  if (rMap != null) {
    rMap.put(PARENT_ID,os);
  }
  return rMap;
}

private Map mergeWithParent ( Map cMap ) { String ct = getClientType ( cMap ) ; String parentId = getParentID ( cMap ) ; Map rMap = cMap ; Map pMap = null ; OrderedSet os = new OrderedSet ( ) ; while ( ( parentId != null ) && ( ! ct . equals ( parentId ) ) ) { pMap = ( Map ) mergedClientData . get ( parentId ) ; if ( pMap == null ) { debug . error ( CLASS + "clientdata null for: " + parentId ) ; rMap = null ; break ; } rMap = mergeMap ( pMap , cMap ) ; os . add ( parentId ) ; cMap = rMap ; ct = getClientType ( pMap ) ; parentId = getParentID ( pMap ) ; } if ( rMap != null ) { rMap . put ( PARENT_ID , os ) ; } return rMap ; }
merge the client with its parent . the parent could be in either in internal or external db . used to merge uaprofile devices .
