Examples of lastObject()


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

            NSArray keys = associations.allKeysForObject(association);
            //if (log.isDebugEnabled())
            //    log.debug("Constructing Ognl association for binding key(s): "
            //              + (keys.count() == 1 ? keys.lastObject() : keys) + " expression: " + ognlExpression);
            if (keys.count() == 1) {
              associations.setObjectForKey(newAssociation, keys.lastObject());
            }
            else {
              for (Enumeration ee = keys.objectEnumerator(); ee.hasMoreElements();) {
                associations.setObjectForKey(newAssociation, e.nextElement());
              }
View Full Code Here

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

    NSArray paths = super.getRequestHandlerPathForRequest(aRequest);
    NSMutableArray temp = new NSMutableArray();
    if (paths != null) {
      int pathCount = paths.count();
      String firstPathComponent = pathCount > 0 ? (String)paths.objectAtIndex(0) : null;
      String lastPathComponent = (String)paths.lastObject();

      if (pathCount > 2) {
        if (useClassName && useActionName) {
          temp.addObject(firstPathComponent);
          temp.addObject(lastPathComponent);
View Full Code Here

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

                                    EOJoin join = (EOJoin) iterator.next();
                                    Object pkValue = pk.objectForKey(join.sourceAttribute().name());
                                    EOKeyValueQualifier qualifier = new EOKeyValueQualifier(join.destinationAttribute().name(), EOQualifier.QualifierOperatorEqual, pkValue);
                                    qualifiers.addObject(qualifier);
                                }
                                fs.setQualifier(qualifiers.count() == 1 ? qualifiers.lastObject() : new EOAndQualifier(qualifiers));
                                value = ec.objectsWithFetchSpecification(fs);
                            }
                        }
                        if (value != null) {
                            NSArray<EOEnterpriseObject> eos = (value instanceof EOEnterpriseObject ? new NSArray(value) : (NSArray) value);
View Full Code Here

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

            }
            log.info("Returning " + result.count() + " after " + (System.currentTimeMillis() - start) + " ms");
        } catch (IOException e) {
            throw NSForwardException._runtimeExceptionForThrowable(e);
        }
        return new IndexDocument(result.lastObject());
    }
   
    public ERDocument documentForId(int docId, float score) {
      ERDocument doc = null;
      try {
View Full Code Here

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

    /** Will test inbetween'ness, will create new groups for periodics */
    public NSDictionary valDictFromSearchForLookup(Object aval) {
        Object lowVal = null;
        Object highVal = null;
        NSMutableArray possibleValuesToUse = possibleValuesToUse();
        Object maxVal = possibleValuesToUse.lastObject();
        Object minVal = possibleValuesToUse.objectAtIndex(0);
        double v = DRValueConverter.converter().doubleForValue(aval);
        double maxv = DRValueConverter.converter().doubleForValue(maxVal);
        double minv = DRValueConverter.converter().doubleForValue(minVal);

View Full Code Here

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

                  }
              }
            }

            if (possibleEntities.count() > 0) {
                result = (EOEntity) possibleEntities.lastObject();
            }
           
            if (log.isEnabledFor(Level.WARN) && possibleEntities.count() > 1)
                log.warn("Found multiple entities: " + possibleEntities.valueForKey("name") + " for table name: " + tableName);
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.