Esempio n. 1
0
  /**
   * Loops over each RecordGroup and group it. Init each new sub RecordGroup with empty record
   * groups for each record group in the parent
   */
  public void groupSubRecordGroupsWithMasterCriteriaLookupDict(NSDictionary groupLookUpDict) {
    Enumeration anEnum = recordGroupList().objectEnumerator();

    while (anEnum.hasMoreElements()) {
      DRRecordGroup recGrp = (DRRecordGroup) anEnum.nextElement();
      NSMutableArray arr = new NSMutableArray(masterCriteriaDrillDownList());
      arr.removeObjectAtIndex(0);
      recGrp.groupSubRecordGroupGroupLookUpDict(arr, groupLookUpDict);
    }
  }
Esempio n. 2
0
  // This is the only the top-level grouping algorithm
  // It returns a dict with two values
  // an array of DRRecordGroups and a list of all the DRCriteria found
  // keys: 'groups', 'criteriaList':
  //
  public NSMutableDictionary childrenFromGroupCriteriaList() {
    DRCriteria crit;
    NSArray crits = _masterCriteria.criteriaLookupDict().allValues();
    Enumeration anEnum = crits.objectEnumerator();
    NSMutableDictionary recGrpDict = new NSMutableDictionary();

    while (anEnum.hasMoreElements()) {
      crit = (DRCriteria) anEnum.nextElement();
      DRRecordGroup recGrp = DRRecordGroup.withCriteriaGroupParent(crit, this, null);
      recGrpDict.setObjectForKey(recGrp, crit.keyDesc());
    }

    return recGrpDict;
  }