Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray$_MinOperator


              ec.lock()// Prevents lock churn
              try {
              ERXFetchSpecification fetchSpec = new ERXFetchSpecification(entityName(), qualifier(), null);
              fetchSpec.setRefreshesRefetchedObjects(true);
              fetchSpec.setIsDeep(true);
              NSArray objects = ec.objectsWithFetchSpecification(fetchSpec);
                  for (Enumeration enumeration = objects.objectEnumerator(); enumeration.hasMoreElements();) {
                      T eo = (T) enumeration.nextElement();
                      addObject(eo);
                  }
              } finally {
                  ec.unlock();
View Full Code Here


     * @param ec editing context to search for unsaved, matching objects
     * @param key key value to identify the unsaved object
     * @return the matching object or null if not found
     */
    public T unsavedMatchingObject(EOEditingContext ec, Object key) {
      NSArray matchingObjects = EOQualifier.filteredArrayWithQualifier(ec.insertedObjects(), ERXQ.equals("entityName", _entityName));
      matchingObjects = EOQualifier.filteredArrayWithQualifier(matchingObjects, fetchObjectsQualifier(key));

      if (matchingObjects.count() > 1) {
      throw new EOUtilities.MoreThanOneException("There was more than one " + _entityName + " with the key '" + key + "'.");
      }
      return matchingObjects.count() == 1 ? (T)matchingObjects.lastObject() : null;
    }
View Full Code Here

     * @return all objects currently in the cache and unexpired
     */
    public NSArray<T> allObjects(EOEditingContext ec, EOQualifier additionalQualifier) {
    additionalQualifier = ERXEOControlUtilities.localInstancesInQualifier(ec, additionalQualifier);
      ERXExpiringCache<Object, EORecord<T>> cache = cache();
      NSArray allKeys = cache.allKeys();
      NSMutableArray allObjects = new NSMutableArray(allKeys.count());

      for (Object entryKey : allKeys) {
        T object = objectForKey(ec, entryKey, false);
        if (object != null && (additionalQualifier == null || additionalQualifier.evaluateWithObject(object))) {
            allObjects.addObject(object);
View Full Code Here

      if (relationship.isToManyToOne() && destinationEntity.isAbstractEntity() && fetchSpec.prefetchingRelationshipKeyPaths().containsObject(relationship.name())) {
        EOFetchSpecification newFetchSpec = (EOFetchSpecification) fetchSpec.clone();
        String inverseName = relationship.anyInverseRelationship().definition(); // from destination to intermediate
        EOQualifier singleTableRestrict = destinationEntity._singleTableRestrictingQualifier();
        EOQualifier migratedRestrict = EOQualifierSQLGeneration.Support._qualifierMigratedFromEntityRelationshipPath(singleTableRestrict, destinationEntity, inverseName);
        newFetchSpec.setQualifier(new EOAndQualifier(new NSArray(new Object[]{newFetchSpec.qualifier(),migratedRestrict})));
        fetchSpec = newFetchSpec;
      }
    }
    return fetchSpec;
  }
View Full Code Here

  private NSMutableArray _repeatingList;

  public NSArray repeatingList() {
    if (_repeatingList == null) {
      _repeatingList = new NSMutableArray();
      NSArray list = (NSArray) valueForBinding("list");
      Integer numberOfRepetetions = (Integer) valueForBinding("repetitions");
      if (numberOfRepetetions == null) {
        numberOfRepetetions = (Integer) valueForBinding("repetetions");
      }
      for (int i = 0; i < numberOfRepetetions.intValue(); i++) {
View Full Code Here

        return _nestingLevel;
    }

    public boolean isExpanded() {
        Object currentItem = valueForBinding("item");
        NSArray selectionPath = (NSArray)_WOJExtensionsUtil.valueForBindingOrNull("selectionPath",this);
        return (_nestingLevel < selectionPath.count())
            && selectionPath.objectAtIndex(_nestingLevel).equals(currentItem);
    }
View Full Code Here

    }


    public int rowCount()  {
        if (_rowCount == -1) {
            NSArray aList = list();
            int aMaxColCount = maxColumns();
            int aListCount = aList.count();
            int aRemainder = 0;
            if (aMaxColCount!=0)  {
                _rowCount = aListCount / aMaxColCount;
                aRemainder = aListCount % aMaxColCount;
            }
View Full Code Here

    }

    public int colCount()  {
        if (_colCount == -1) {
            int aMaxColumns = maxColumns();
            NSArray aList = list();
            if (currentRow < (rowCount() - 1)) {
                _colCount = aMaxColumns;
            } else {
                if (aMaxColumns!=0)
                    _colCount = aList.count() % aMaxColumns;
                if (_colCount == 0) {
                    _colCount = aMaxColumns;
                }
            }
        }
View Full Code Here

        }
    }


    public void pushItem()  {
        NSArray aList = list();
        int index = currentCol+maxColumns()*currentRow;
        Object item = index < aList.count() ? aList.objectAtIndex(index) : null;
        setValueForBinding(item, "item");
        if (canSetValueForBinding("row")) {
            setValueForBinding(Integer.valueOf(currentRow), "row");
        }
        if (canSetValueForBinding("col")) {
View Full Code Here

           else {
             selectedObjects = (NSMutableArray)selections;
           }
        }
         
        NSArray list = (NSArray) _list.valueInComponent(parent);
       
        Object previousGroup = null;
        boolean didOpenOptionGroup = false;
        boolean shouldEscapeHTML = _escapeHTML != null ? _escapeHTML.booleanValueInComponent(parent) : true;
       
        for(int i = 0; i < list.count(); i++)
        {
             Object listItem = list.objectAtIndex(i);
             _item.setValue(listItem, parent);
            
             Object currentGroup = group.valueInComponent(parent);
             if ( ! currentGroup.equals(previousGroup))
             {
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSArray$_MinOperator

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.