Examples of objectAtIndex()


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

                   .editingContext()
                   : null);
            String entityName = (String) valueForBinding("entityName");
            if(entityName == null) {
                entityName = (nsarray != null && nsarray.count() > 0
                              ? ((EOEnterpriseObject) nsarray.objectAtIndex(0))
                              .entityName()
                              : null);
            }
            if(entityName != null) {
                if (_dataSource == null || !entityName.equals(_dataSource.classDescriptionForObjects().entityName()) || _dataSource.editingContext() != eoeditingcontext)
View Full Code Here

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

    }

    public EOSortOrdering _primaryOrdering() {
        NSArray anArray = _sortOrderingArray();
        if (anArray.count() > 0) {
            EOSortOrdering anOrdering = (EOSortOrdering)anArray.objectAtIndex(0);
            return anOrdering;
        }
        return null;
    }
View Full Code Here

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

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

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

        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

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

        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

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

      }
    }

    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

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

        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

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

  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

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

   
    // 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
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.