private void reconciliateWithNested( ObjectConstraintContext<?> parent, ObjectConstraintContext<?> nestedContext) throws MdbException { boolean rowsExtracted = parent.extractRowsFromNested(nestedContext); if (rowsExtracted) { process(parent); } }
protected boolean reconciliate( ObjectConstraintContext<?> firstOcc, ObjectConstraintContext<?> secondOcc) throws MdbException { if (firstOcc.getDepth() == secondOcc.getDepth()) { if (firstOcc == secondOcc) { return process(firstOcc); } else { ObjectConstraintContext<?> firstParentOcc = firstOcc.getParentContext(); ObjectConstraintContext<?> secondParentOcc = secondOcc.getParentContext(); reconciliateWithNested(firstParentOcc, firstOcc); reconciliateWithNested(secondParentOcc, secondOcc); return reconciliate(firstParentOcc, secondParentOcc); } } else if (firstOcc.getDepth() > secondOcc.getDepth()) { ObjectConstraintContext<?> firstParentOcc = firstOcc.getParentContext(); reconciliateWithNested(firstParentOcc, firstOcc); return reconciliate(firstParentOcc, secondOcc); } else { ObjectConstraintContext<?> secondParentOcc = secondOcc.getParentContext(); reconciliateWithNested(secondParentOcc, secondOcc); return reconciliate(firstOcc, secondParentOcc); } }