コード例 #1
0
 private void reconciliateWithNested(
     ObjectConstraintContext<?> parent, ObjectConstraintContext<?> nestedContext)
     throws MdbException {
   boolean rowsExtracted = parent.extractRowsFromNested(nestedContext);
   if (rowsExtracted) {
     process(parent);
   }
 }
コード例 #2
0
  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);
    }
  }