Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableArray.objectAtIndex()


  protected void fixDuplicateSingleTableInheritanceDropStatements(EOSynchronizationFactory syncFactory, NSMutableDictionary flags, StringBuffer sqlBuffer) {
    if ("YES".equals(flags.valueForKey(EOSchemaGeneration.DropTablesKey))) {
      NSMutableArray dropEntities = new NSMutableArray(_entities);
      for (int entityNum = dropEntities.count() - 1; entityNum >= 0; entityNum--) {
        EOEntity entity = (EOEntity) dropEntities.objectAtIndex(entityNum);
        if (isSingleTableInheritance(entity)) {
          dropEntities.removeObjectAtIndex(entityNum);
        }
      }
      if (dropEntities.count() != _entities.count()) {
View Full Code Here


  protected void fixDuplicateSingleTableInheritanceDropStatements(EOSynchronizationFactory syncFactory, NSMutableDictionary flags, StringBuffer sqlBuffer) {
    if ("YES".equals(flags.valueForKey(EOSchemaGeneration.DropTablesKey))) {
      NSMutableArray dropEntities = new NSMutableArray(_entities);
      for (int entityNum = dropEntities.count() - 1; entityNum >= 0; entityNum--) {
        EOEntity entity = (EOEntity) dropEntities.objectAtIndex(entityNum);
        if (isSingleTableInheritance(entity)) {
          dropEntities.removeObjectAtIndex(entityNum);
        }
      }
      if (dropEntities.count() != _entities.count()) {
View Full Code Here

        throw new IllegalStateException("There was more than one item that matched the ID '" + itemID + "' in " + list + ".");
      }
      Object replacingItem = matchingItems.objectAtIndex(0);
      if (mutableList) {
        int replacedItemIndex = itemPageRange.location();
        Object replacedItem = reorderedList.objectAtIndex(replacedItemIndex);
        if (replacedItem != replacingItem) {
          int replacingItemIndex = replacedItemIndex + itemPageArray.indexOfObject(replacingItem);
          reorderedList.replaceObjectAtIndex(replacingItem, replacedItemIndex);
          reorderedList.replaceObjectAtIndex(replacedItem, replacingItemIndex);
        }
View Full Code Here

        nsmutablearray.addObject(wohtmlbarestring);
      }
    }
    WOElement obj = null;
    if (nsmutablearray != null && nsmutablearray.count() == 1) {
      Object obj2 = nsmutablearray.objectAtIndex(0);
      if (obj2 instanceof WOComponentReference) {
        obj = new WODynamicGroup(_name, null, (WOElement) obj2);
      }
      else {
        obj = (WOElement) obj2;
View Full Code Here

      }
    }

    int i = localNSMutableArray.count();
    for (int j = 0; j < i; ++j) {
      InetAddress localInetAddress2 = (InetAddress)localNSMutableArray.objectAtIndex(j);
      try {
        InetAddress[] arrayOfInetAddress3 = InetAddress.getAllByName(localInetAddress2.getHostName());
        _addInetAddressArray(arrayOfInetAddress3, localNSMutableArray);
      } catch (Exception localException4) {
        NSLog.err.appendln("<WOHostUtilities>: Couldn't get InetAddresses for '" + localInetAddress2.getHostName() + "': " + localException4);
View Full Code Here

        NSMutableArray currentValues = (NSMutableArray) NSKeyValueCoding.Utility.valueForKey(aSourceObject, masterKey);
        int count = currentValues.count();
        EOEnterpriseObject o;

        for (int i = count - 1; i >= 0; i--) {
            o = (EOEnterpriseObject) currentValues.objectAtIndex(i);

            if (newValues == null || newValues.indexOfIdenticalObject(o) == NSArray.NotFound) { // not found

                if (isDictionary) {
                    currentValues.removeObject(o);
View Full Code Here

  private NSMutableArray sampleData() {
    NSData data = new NSData(application().resourceManager().bytesForResourceNamed("AjaxGridExampleTestData.plist", null, NSArray.EmptyArray));
    NSMutableArray sampleData = new NSMutableArray((NSArray) NSPropertyListSerialization.propertyListFromData(data, CharEncoding.UTF_8));
    Random random = new Random(new NSTimestamp().getNanos());
    for (int i = 0; i < sampleData.count(); i++) {
      NSMutableDictionary<String,Object> row = (NSMutableDictionary<String,Object>) sampleData.objectAtIndex(i);
      row.setObjectForKey(Integer.valueOf(random.nextInt()), "number");
      row.setObjectForKey(new NSTimestamp(random.nextLong()), "date");
      row.setObjectForKey(Integer.valueOf(i + 1).toString(), "level");
    }
View Full Code Here

   
    // Add the mandatory sort if it is not present
    if (hasMandatorySort()) {
      boolean includesMandatorySort = false;
      for (int i = 0; i < sortOrders.count() && ! includesMandatorySort; i++) {
        if (((NSKeyValueCoding) sortOrders.objectAtIndex(i)).valueForKey(KEY_PATH).equals(manadatorySortKeyPath())) {
          includesMandatorySort = true;
        }
      }
      if ( ! includesMandatorySort) {
        sortOrders.addObject(manadatorySortDictionary());
View Full Code Here

      NSArray immutableOptionalConfigurationFiles = arrayForKey("er.extensions.ERXProperties.OptionalConfigurationFiles");
      NSMutableArray optionalConfigurationFiles = null;
      if (immutableOptionalConfigurationFiles != null) {
        optionalConfigurationFiles = immutableOptionalConfigurationFiles.mutableClone();
        for (int i = 0; i < optionalConfigurationFiles.count(); i ++) {
          String optionalConfigurationFile = (String)optionalConfigurationFiles.objectAtIndex(i);
          if (!new File(optionalConfigurationFile).exists()) {
              String resourcePropertiesPath = ERXFileUtilities.pathForResourceNamed(optionalConfigurationFile, "app", null);
              if (resourcePropertiesPath != null) {
                  optionalConfigurationFiles.replaceObjectAtIndex(ERXProperties.getActualPath(resourcePropertiesPath), i);
              }
View Full Code Here

      Object replacingItem = matchingItems.objectAtIndex(0);

      if(mutableList) {
        int replacedItemIndex = itemPageRange.location();
        Object replacedItem = reorderedList.objectAtIndex(replacedItemIndex);
        if(replacedItem != replacingItem) {
          int replacingItemIndex = replacedItemIndex + itemPageArray.indexOfObject(replacingItem);
          reorderedList.replaceObjectAtIndex(replacingItem, replacedItemIndex);
          reorderedList.replaceObjectAtIndex(replacedItem, replacingItemIndex);
        }
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.