Examples of objectAtIndex()


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

  public NSMutableDictionary columnsByKeypath() {
    if (columnsByKeypath == null) {
      NSArray columns = columns();
      columnsByKeypath = new NSMutableDictionary(columns.count());
      for (int i = 0; i < columns.count(); i++) {
        columnsByKeypath.setObjectForKey(columns.objectAtIndex(i), ((NSKeyValueCoding) columns.objectAtIndex(i)).valueForKey(KEY_PATH));
      }
    }

    return columnsByKeypath;
  }
View Full Code Here

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

  public NSMutableDictionary sortOrdersByKeypath() {
    if (sortOrdersByKeypath == null) {
      NSArray sortOrders = sortOrders();
      sortOrdersByKeypath = new NSMutableDictionary(sortOrders.count());
      for (int i = 0; i < sortOrders.count(); i++) {
        sortOrdersByKeypath.setObjectForKey(sortOrders.objectAtIndex(i), ((NSKeyValueCoding) sortOrders.objectAtIndex(i)).valueForKey(KEY_PATH));
      }
    }
    return sortOrdersByKeypath;
  }
View Full Code Here

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

  public NSMutableDictionary sortOrdersByKeypath() {
    if (sortOrdersByKeypath == null) {
      NSArray sortOrders = sortOrders();
      sortOrdersByKeypath = new NSMutableDictionary(sortOrders.count());
      for (int i = 0; i < sortOrders.count(); i++) {
        sortOrdersByKeypath.setObjectForKey(sortOrders.objectAtIndex(i), ((NSKeyValueCoding) sortOrders.objectAtIndex(i)).valueForKey(KEY_PATH));
      }
    }
    return sortOrdersByKeypath;
  }
View Full Code Here

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

  public NSMutableDictionary formattersByKeypath() {
    if (formattersByKeypath == null) {
      NSArray columns = columns();
      formattersByKeypath = new NSMutableDictionary(columns.count());
      for (int i = 0; i < columns.count(); i++) {
        NSDictionary column = (NSDictionary) columns.objectAtIndex(i);
        String className = (String) column.valueForKey(FORMATTER_CLASS);
        if (className != null) {
          try {
            Format formatter = (Format) Class.forName(className).newInstance();
            String pattern = (String) column.valueForKey(FORMAT_PATTERN);
View Full Code Here

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

    if (treeModel().isExpanded(node)) {
      NSArray childrenTreeNodes = treeModel().childrenTreeNodes(node);
      if (childrenTreeNodes != null) {
        int childTreeNodeCount = childrenTreeNodes.count();
        for (int childTreeNodeNum = 0; childTreeNodeNum < childTreeNodeCount; childTreeNodeNum++) {
          Object childNode = childrenTreeNodes.objectAtIndex(childTreeNodeNum);
          _fillInOpenNodes(childNode, nodes, true);
        }
      }
    }
  }
View Full Code Here

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

    EREntityStore store = _entityStoreForEntity(entity, false);
    NSArray pkAttributes = entity.primaryKeyAttributes();
    if (pkAttributes.count() > 1) {
      throw new EOGeneralAdaptorException("Failed to generate primary key because " + entity.name() + " has a composite primary key.");
    }
    EOAttribute pkAttribute = (EOAttribute) pkAttributes.objectAtIndex(0);
    int nextSequence = store.nextSequence();
    Object pkValue;
    String className = pkAttribute.className();
    String valueType = pkAttribute.valueType();
    if ("NSData".equals(className)) {
View Full Code Here

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

      NSArray values = pkDict.allValues();
      if (values.count() > 1) throw new IllegalArgumentException("subEntityForEntity in its default implementation"+
      " works only with single pk long values " + entity.name()" has " +  pkDict);
      long pkValueWithCode;
      try {
        Number n = (Number) values.objectAtIndex(0);
        pkValueWithCode = n.longValue();
      } catch (ClassCastException e) {
        throw new IllegalArgumentException("subEntityForEntity in its default implementation"+
            " works only with single pk long values, expected a java.lang.Number but got a "+values.objectAtIndex(0));
      }
View Full Code Here

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

      try {
        Number n = (Number) values.objectAtIndex(0);
        pkValueWithCode = n.longValue();
      } catch (ClassCastException e) {
        throw new IllegalArgumentException("subEntityForEntity in its default implementation"+
            " works only with single pk long values, expected a java.lang.Number but got a "+values.objectAtIndex(0));
      }
      long entityCode = pkValueWithCode & ((1 << ERXLongPrimaryKeyFactory.CODE_LENGTH) - 1);
      if (entityCode == 0) return null;
      for (Enumeration subEntities = entity.subEntities().objectEnumerator(); subEntities.hasMoreElements();) {
        EOEntity subEntity = (EOEntity) subEntities.nextElement();
View Full Code Here

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

    else if (type == AjaxOption.STRING_ARRAY) {
      if (_value instanceof NSArray) {
        NSArray arrayValue = (NSArray) _value;
        int count = arrayValue.count();
        if (count == 1) {
          strValue = new AjaxValue(AjaxOption.STRING, arrayValue.objectAtIndex(0)).javascriptValue();
        }
        else if (count > 0) {
          StringBuilder sb = new StringBuilder();
          sb.append('[');
          Enumeration objEnum = arrayValue.objectEnumerator();
View Full Code Here

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

        if (hasBinding("list")) {
            NSArray nsarray = (NSArray) valueForBinding("list");
            nsarray = ERXArrayUtilities.removeNullValues(nsarray);
            EOEditingContext eoeditingcontext
                = (nsarray != null && nsarray.count() > 0
                   ? ((EOEnterpriseObject) nsarray.objectAtIndex(0))
                   .editingContext()
                   : null);
            String entityName = (String) valueForBinding("entityName");
            if(entityName == null) {
                entityName = (nsarray != null && nsarray.count() > 0
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.