Examples of EOSortOrdering


Examples of com.webobjects.eocontrol.EOSortOrdering

        relationshipDataSource.qualifyWithRelationshipKey(relationshipKey(), newObject);
        setDataSource(relationshipDataSource);
        relationshipDisplayGroup.setDataSource(relationshipDataSource);

        if(isSortedRelationship()){
            EOSortOrdering indexOrdering = EOSortOrdering.sortOrderingWithKey(indexKey(),
                                                                              EOSortOrdering.CompareAscending);
            relationshipDisplayGroup.setSortOrderings(new NSArray(indexOrdering));
        }

       
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

        }
        return "Unsorted.gif";
    }

    public boolean _isCurrentKeyPrimary() {
        EOSortOrdering anOrdering = _primaryOrdering();
        if (anOrdering.key().equals(key())) {
            return true;
        }
        return false;
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

        }
        return false;
    }

    public NSSelector _primaryKeyOrderingSelector() {
        EOSortOrdering anOrdering = _primaryOrdering();
        return anOrdering.selector();
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

    }

    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.eocontrol.EOSortOrdering

        return (NSMutableArray<EOSortOrdering>)orderingArray;
    }

    protected void _removeOrderingWithKey(String aKey) {
        int anIndex = 0;
        EOSortOrdering ordering;
        NSArray orderingArray = _sortOrderingArray();
        Enumeration anEnumerator = orderingArray.objectEnumerator();
        while (anEnumerator.hasMoreElements()) {
            ordering = (EOSortOrdering) anEnumerator.nextElement();
            if (aKey.equals(ordering.key())) {
                ((NSMutableArray)orderingArray).removeObjectAtIndex(anIndex);
                return ;
            }
            anIndex++;
        }
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

        }
    }

    protected void _makePrimaryOrderingWithSelector(NSSelector aSelector) {
        NSMutableArray<EOSortOrdering> orderingArray = (NSMutableArray<EOSortOrdering>)_sortOrderingArray();
        EOSortOrdering aNewOrdering = EOSortOrdering.sortOrderingWithKey(key(),
            aSelector);
        orderingArray.insertObjectAtIndex(aNewOrdering, 0);
        if (orderingArray.count() > 3) {
            // ** limits ing to 3 levels
            orderingArray.removeLastObject();
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

    dg.setNumberOfObjectsPerBatch(20);
  }

  private void setSortOrder(String name) {
    NSArray<EOSortOrdering> oldArray = dg.sortOrderings();
    EOSortOrdering oldOrdering = null;
    EOSortOrdering newOrdering = null;
    if (oldArray != null) {
      oldOrdering = oldArray.lastObject();
    }
    if (oldOrdering != null && oldOrdering.key().equals(name)) {
      newOrdering = EOSortOrdering.sortOrderingWithKey(name, oldOrdering.selector() == EOSortOrdering.CompareDescending ? EOSortOrdering.CompareAscending : EOSortOrdering.CompareDescending);
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

            sortOrderingDefinitionCount = sortOrderingDefinition != null ? sortOrderingDefinition.count() : 0;

            while (i < sortOrderingDefinitionCount) {
                final String key = (String)sortOrderingDefinition.objectAtIndex(i++);
                final String selectorKey = (String)sortOrderingDefinition.objectAtIndex(i++);
                final EOSortOrdering sortOrdering = new EOSortOrdering(key, ERXArrayUtilities.sortSelectorWithKey(selectorKey));
                (sortOrderings != null ? sortOrderings : (sortOrderings = new NSMutableArray())).addObject(sortOrdering);
            }

            _defaultSortOrderingsForDestinationEntity = sortOrderings != null ? sortOrderings.immutableClone() : NSArray.EmptyArray;
        }
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

        NSArray<String> displayPropertyKeys = (NSArray<String>) d2wContext().valueForKey("displayPropertyKeys");
        for (int i = 0; i < sortOrderingDefinition.count();) {
          String sortKey = sortOrderingDefinition.objectAtIndex(i++);
          String sortSelectorKey = sortOrderingDefinition.objectAtIndex(i++);
          if (!checkSortOrderingKeys() || isValidSortKey(displayPropertyKeys, sortKey)) {
            EOSortOrdering sortOrdering = new EOSortOrdering(sortKey, ERXArrayUtilities.sortSelectorWithKey(sortSelectorKey));
            validatedSortOrderings.addObject(sortOrdering);
          }
        }
        sortOrderings = validatedSortOrderings;
        if (log.isDebugEnabled()) {
View Full Code Here

Examples of com.webobjects.eocontrol.EOSortOrdering

        if (instancesArray == null) {
            instancesArray = NSArray.EmptyArray;
        }
        NSMutableArray<MInstance> result = new NSMutableArray<MInstance>();
        result.addObjectsFromArray(currentApplication.instanceArray());
        EOSortOrdering order = new EOSortOrdering("id", EOSortOrdering.CompareAscending);
        EOSortOrdering.sortArrayUsingKeyOrderArray(result, new NSArray(order));
        instancesArray = result;
        // AK: the MInstances don't really support equals()...
        if (!page.displayGroup.allObjects().equals(instancesArray)) {
            page.displayGroup.setObjectArray(instancesArray);
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.