Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray.objectEnumerator()


        if (_staleTotal) {
            for(Enumeration en = recordList().objectEnumerator(); en.hasMoreElements(); ) {
                int i = 0;
                DRRecord rec = (DRRecord)en.nextElement();
                NSArray flatlist = rec.flatValueList();
                for(Enumeration en2 = flatlist.objectEnumerator(); en2.hasMoreElements(); ) {
                    DRValue val = (DRValue)en2.nextElement();
                    boolean isComputed = val.attribute().isComputed();
                    double subTot, lastTot, newTot;
                    Number indexNum = Integer.valueOf(i);
                    DRValue totalValue = (DRValue)_totals.objectForKey(indexNum);
View Full Code Here


    public NSArray rawRecordList() {
        if (_rawRecordList == null) {
            NSMutableArray rawRecs = new NSMutableArray();
            NSArray recs = sortedRecordList();
            Enumeration en = recs.objectEnumerator();

            while (en.hasMoreElements()) {
                DRRecord rec = (DRRecord)en.nextElement();
                Object rawRec = rec.rawRecord();
                rawRecs.addObject(rawRec);
View Full Code Here

    public boolean childrenFromGroupCriteriaList(DRGroup grp) {
        //was sorted
        boolean listFound = false;
        NSArray crits = grp.criteriaList();
        Enumeration anEnum = crits.objectEnumerator();

        while (anEnum.hasMoreElements()) {
            DRCriteria crit = (DRCriteria)anEnum.nextElement();
            DRRecordGroup recGrp = DRRecordGroup.withCriteriaGroupParent(crit, grp, this);
            listFound = recGrp.pregroupedListFound();
View Full Code Here

        buildSubValues();
    }

    private void buildSubValues() {
        NSArray attrs = attribute().attributes();
        Enumeration anEnum = attrs.objectEnumerator();

        while (anEnum.hasMoreElements()) {
            DRAttribute att = (DRAttribute)anEnum.nextElement();
            DRValue val;
View Full Code Here

        NSArray arr = (NSArray)l.valueForKey("ClassPaths");
        cp = arr.componentsJoinedByString(":");
        ClassInfo.setClassPath(cp);
        arr = (NSArray)l.valueForKey("PackagesToIndex");
        for(Enumeration e = arr.objectEnumerator(); e.hasMoreElements();) {
            PackageProxy.indexPackage((String)e.nextElement(), null, true);
        }
    }

    public static PackageProxy packageProxyForName(String packageName) {
View Full Code Here

    }

    public NSArray newSubCriteriaListFromMC(DRMasterCriteria amc) {
        NSMutableArray newSMCs = new NSMutableArray();
        NSArray oldSMCs = amc.subCriteriaList();
        Enumeration en = oldSMCs.objectEnumerator();

        while (en.hasMoreElements()) {
            DRSubMasterCriteria smc = (DRSubMasterCriteria)en.nextElement();
            DRSubMasterCriteria newsmc = DRSubMasterCriteria.withKeyUseMethodUseTimeFormatFormatPossibleValuesUseTypeGroupEdgesPossibleValues(smc.key(), smc.useMethod(), smc.useTimeFormat(), smc.format(), smc.possibleValuesUseType(), smc.groupEdges(), smc.rawPossibleValues());
            newSMCs.addObject(newsmc);
View Full Code Here

    }


    public Object regenReportGroup() {
        NSArray oldMCs = new NSArray(masterCriteriaList());
        Enumeration en = oldMCs.objectEnumerator();

        while (en.hasMoreElements()) {
            DRMasterCriteria amc = (DRMasterCriteria)en.nextElement();
            NSArray smcList = newSubCriteriaListFromMC(amc);
            replaceMCWith(amc, smcList);
View Full Code Here

        osc.lock();
        try {

            NSArray rootKeyPathObjects = KeyPath.parseKeyPathStrings(keypaths);

            Enumeration keyPathObjectsEnum = rootKeyPathObjects.objectEnumerator();
            while (keyPathObjectsEnum.hasMoreElements()) {
                KeyPath kp = (KeyPath) keyPathObjectsEnum.nextElement();
                kp.traverseForObjects(sourceObjects, skipFaultedSourceObjects);
            }
View Full Code Here

        if (null == colspan) {
            int numVisibleKeys = 0;
            int multiplier = shouldDisplayDetailedPageMetrics() ? 2 : 1;
            String currentKey = d2wContext().propertyKey(); // Cache the current key.
            NSArray displayPropertyKeys = (NSArray)d2wContext().valueForKey("displayPropertyKeys");
            for (Enumeration keysEnum = displayPropertyKeys.objectEnumerator(); keysEnum.hasMoreElements();) {
                String key = (String)keysEnum.nextElement();
                d2wContext().setPropertyKey(key);
                if (!isKeyOmitted()) {
                    numVisibleKeys++;
                }
View Full Code Here

      StringBuilder buf = new StringBuilder(s.length());
      Pattern pattern = Pattern.compile(".*ALTER TABLE .* ADD CONSTRAINT (.*) FOREIGN KEY .* REFERENCES .* \\(.*\\) DEFERRABLE INITIALLY DEFERRED.*");
      Pattern pattern2 = Pattern.compile("(.*ALTER TABLE .* ADD CONSTRAINT ).*( FOREIGN KEY .* REFERENCES .* \\(.*\\) DEFERRABLE INITIALLY DEFERRED.*)");
      String lineSeparator = System.getProperty("line.separator");

      for (Enumeration e = a.objectEnumerator(); e.hasMoreElements();) {
        String statementLine = (String) e.nextElement();
        NSArray b = NSArray.componentsSeparatedByString(statementLine, lineSeparator);
        for (Enumeration e1 = b.objectEnumerator(); e1.hasMoreElements();) {
          String statement = (String) e1.nextElement();
          if (!pattern.matcher(statement).matches()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.