Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableArray$Itr


    public NSArray defaultSortOrderingsForDestinationEntity() {
        if (_defaultSortOrderingsForDestinationEntity == null) {
            final D2WContext context = ERD2WContext.newContext();
            final NSArray sortOrderingDefinition;
            final int sortOrderingDefinitionCount;
            NSMutableArray sortOrderings = null;
            int i = 0;

            context.setEntity(destinationEntity());
            sortOrderingDefinition = (NSArray)context.valueForKey("defaultSortOrdering");
            sortOrderingDefinitionCount = sortOrderingDefinition != null ? sortOrderingDefinition.count() : 0;

            while (i < sortOrderingDefinitionCount) {
                final String key = (String)sortOrderingDefinition.objectAtIndex(i++);
                final String selectorKey = (String)sortOrderingDefinition.objectAtIndex(i++);
                final EOSortOrdering sortOrdering = new EOSortOrdering(key, ERXArrayUtilities.sortSelectorWithKey(selectorKey));
                (sortOrderings != null ? sortOrderings : (sortOrderings = new NSMutableArray())).addObject(sortOrdering);
            }

            _defaultSortOrderingsForDestinationEntity = sortOrderings != null ? sortOrderings.immutableClone() : NSArray.EmptyArray;
        }

        return _defaultSortOrderingsForDestinationEntity;
    }
View Full Code Here


    private int _transactionSize;
    private long _creationDate;

    public RemoteChange(String identifier, int transactionID, int transactionSize) {
      _creationDate = System.currentTimeMillis();
      _remoteCacheChanges = new NSMutableArray();
      _identifier = identifier;
      _transactionID = transactionID;
      _transactionSize = transactionSize;
    }
View Full Code Here

    super.appendToResponse(response, context);
  }
 
  @SuppressWarnings({ "rawtypes", "unchecked" })
  public NSDictionary createAjaxOptions() {
    NSMutableArray ajaxOptionsArray = new NSMutableArray();

    // PROTOTYPE OPTIONS
    ajaxOptionsArray.addObject(new AjaxOption("grid", AjaxOption.NUMBER));
    ajaxOptionsArray.addObject(new AjaxOption("handle", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("invert", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("limit", AjaxOption.DICTIONARY));
    ajaxOptionsArray.addObject(new AjaxOption("modifiers", AjaxOption.DICTIONARY));
    ajaxOptionsArray.addObject(new AjaxOption("snap", AjaxOption.NUMBER));
    ajaxOptionsArray.addObject(new AjaxOption("style", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("unit", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("preventDefault", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("stopPropagation", AjaxOption.BOOLEAN));
   
    ajaxOptionsArray.addObject(new AjaxOption("container", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("droppables", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("precalculate", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("includeMargins", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("checkDroppables", AjaxOption.BOOLEAN));
   
    ajaxOptionsArray.addObject(new AjaxOption("onBeforeStart", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onStart", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onSnap", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onCancel", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onComplete", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onDrag", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onDrop", AjaxOption.SCRIPT));

    ajaxOptionsArray.addObject(new AjaxOption("onEnter", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onLeave", AjaxOption.SCRIPT));

    ajaxOptionsArray.addObject(new AjaxOption("ghost", Boolean.FALSE, AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("useSpinner", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("spinnerTarget", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("spinnerOptions", AjaxOption.DICTIONARY));

    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
   
    return options;
 
View Full Code Here

      _deleted = snapshotsGroupedByEntity(_deletedGIDs, _coordinator);
      _updated = snapshotsGroupedByEntity(_updatedGIDs, _coordinator);
      _inserted = snapshotsGroupedByEntity(_insertedGIDs, _coordinator);
      _invalidated = snapshotsGroupedByEntity(_invalidatedGIDs, _coordinator);
      _causedByRemoteUpdate = causedByRemoteUpdate;
      _localCacheChanges = new NSMutableArray();
      if (!causedByRemoteUpdate) {
        Enumeration cosEnum = osc.cooperatingObjectStores().objectEnumerator();
        while (cosEnum.hasMoreElements()) {
          EOCooperatingObjectStore cos = (EOCooperatingObjectStore) cosEnum.nextElement();
          if (cos instanceof ERXDatabaseContext) {
View Full Code Here

          EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(key);
          if (dbc == null) {
            dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc, entityName);
            dbcs.setObjectForKey(dbc, key);
          }
          NSMutableArray snapshotsForEntity = (NSMutableArray) result.objectForKey(entityName);
          if (snapshotsForEntity == null) {
            snapshotsForEntity = new NSMutableArray();
            result.setObjectForKey(snapshotsForEntity, entityName);
          }
          synchronized (snapshotsForEntity) {
            Object o = dbc.snapshotForGlobalID(globalID);
            if (o != null) {
              snapshotsForEntity.addObject(o);
            }
          }
        }
      }
      return result;
View Full Code Here

  public String accordionID() {
    return _accordionID;
  }

  public NSDictionary createAjaxOptions() {
    NSMutableArray ajaxOptionsArray = new NSMutableArray();
    ajaxOptionsArray.addObject(new AjaxOption("expandedBg", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("hoverBg", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("collapsedBg", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("expandedTextColor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("expandedFontWeight", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("hoverTextColor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("collapsedTextColor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("collapsedFontWeight", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("hoverTextColor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("borderColor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("panelHeight", AjaxOption.NUMBER));
    ajaxOptionsArray.addObject(new AjaxOption("onHideTab", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onShowTab", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onLoadShowTab", AjaxOption.SCRIPT));
    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
    return options;
  }
View Full Code Here

            index.clear();
        }
    }

    public NSArray indicesForEntity(String entityName) {
        NSMutableArray result = new NSMutableArray();
        for(Enumeration i = _indices.objectEnumerator(); i.hasMoreElements(); ) {
            ERAutoIndex index = (ERAutoIndex) i.nextElement();
            if(index.handlesEntity(entityName)) {
                result.addObject(index);
            }
        }
        return result;
    }
View Full Code Here

        NSArray<MInstance> allInstances = app.instanceArray();
        result.setObjectForKey(Integer.valueOf(allInstances.count()), "configuredInstances");
       
        int runningInstances = 0;
        int refusingInstances = 0;
        NSMutableArray instances = new NSMutableArray();
        for (MInstance instance : allInstances) {
            if (instance.isRunning_M()) {
                runningInstances++;
                instances.addObject(instance);
            }
            if (instance.isRefusingNewSessions()) {
                refusingInstances++;
            }
        }
View Full Code Here

                public void addObjectsFromArrayIfAbsentToErrorMessageArray(NSArray<String> aErrors) {
                   
                }});
            handler.startReading();
            try {
                NSMutableArray stats = new NSMutableArray();
                for (MApplication app : siteConfig().applicationArray()) {
                    handler.getInstanceStatusForHosts(app.hostArray());
                    NSDictionary appStats = historyEntry(app);
                    stats.addObject(appStats);
                }
                response.appendContentString(NSPropertyListSerialization.stringFromPropertyList(stats));
            } finally {
                handler.endReading();
            }
View Full Code Here

    public EOFetchSpecification primaryKeyFetchSpecificationForEntity(EOEditingContext ec, EOQualifier eoqualifier, NSArray sortOrderings, NSArray additionalKeys) {
        String entityName = entityName();
        EOFetchSpecification fs = new EOFetchSpecification(entityName, eoqualifier, sortOrderings);
        fs.setFetchesRawRows(true);
        EOEntity entity = entity(ec);
        NSMutableArray keys = new NSMutableArray(entity.primaryKeyAttributeNames());
        if(additionalKeys != null) {
            keys.addObjectsFromArray(additionalKeys);
        }
        if(entity.restrictingQualifier() != null) {
            NSArray restrict = entity.restrictingQualifier().allQualifierKeys().allObjects();
            keys.addObjectsFromArray(restrict);
        }
        if(entity.isAbstractEntity()) {
            NSArray restrict = (NSArray)entity.subEntities().valueForKeyPath("restrictingQualifier.allQualifierKeys.allObjects.@flatten.@unique");
            keys.addObjectsFromArray(restrict);
        }
        fs.setRawRowKeyPaths(keys);
        return fs;
    }
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSMutableArray$Itr

Copyright © 2018 www.massapicom. 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.