コード例 #1
0
ファイル: DRGroup.java プロジェクト: hypeastrum/wonder
  /**
   * 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);
    }
  }
コード例 #2
0
ファイル: DRGroup.java プロジェクト: hypeastrum/wonder
  // 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;
  }