Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSSelector


                log.error("EC of datasource is null, possible resubmit: " + ERXApplication.erxApplication().extraInformationForExceptionInContext(null, context()));
                _list = NSArray.EmptyArray;
              }
            }
            NSArray destinationSortKeys = destinationSortKeys();
            NSSelector sorting = (sortCaseInsensitive() ? EOSortOrdering.CompareAscending : EOSortOrdering.CompareCaseInsensitiveAscending);
            if (destinationSortKeys != null && destinationSortKeys.count() > 0) {
              _list = ERXArrayUtilities.sortedArraySortedWithKeys(_list, destinationSortKeys, sorting);
            }
            if(includeUnmatchedValues()) {
              NSArray currentValues = currentValues();
View Full Code Here


    }
   
    private void registerForFileNotification(String path, String callbackMethod) {
        try {
            ERXFileNotificationCenter.defaultCenter().addObserver(this,
                                                                  new NSSelector(callbackMethod, ERXConstant.NotificationClassArray),
                                                                  path);
            log.debug("Registered: " + path);
        } catch (Exception ex) {
            log.error("An exception occured while registering the observer for the "
                      + "logging configuration file: "
View Full Code Here

          if (System.getProperty("_DisableClasspathReorder") == null) {
            System.setProperty(cpName, newCP);
          }
        }
      }
      NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("bundleDidLoad", ERXConstant.NotificationClassArray), "NSBundleDidLoadNotification", null);
    }
View Full Code Here

    protected int _currentState = Reset;
    public int currentState() {
        if (_currentState == Reset) {
            _currentState = Unsorted;
            if (_isCurrentKeyPrimary()) {
                NSSelector aCurrentState = _primaryKeySortOrderingSelector();
                if (aCurrentState.equals(EOSortOrdering.CompareAscending)
                    || aCurrentState.equals(EOSortOrdering.CompareCaseInsensitiveAscending)) {
                    _currentState = SortedAscending;
                } else if (aCurrentState.equals(EOSortOrdering.CompareDescending)
                    || aCurrentState.equals(EOSortOrdering.CompareCaseInsensitiveDescending)) {
                    _currentState = SortedDescending;
                }
            }
        }
        return _currentState;
View Full Code Here

        return null;
    }

    protected NSSelector _primaryKeySortOrderingSelector() {
        EOSortOrdering eosortordering = _primarySortOrdering();
        NSSelector nsselector = null;
        if(eosortordering != null)
            nsselector = eosortordering.selector();
        return nsselector;
    }
View Full Code Here

    public Session() {
        super();
        //[self setTimeOut:10];
        reportEditor = false;
        Class arrClass [] = {NSNotification.class};
        NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("synchModel", arrClass), "DRReportModelUpdate", null);
        return;
    }
View Full Code Here

        super(context);
    }
 
    @Override
    public void awake() {
      NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("relatedObjectDidChange", ERXConstant.NotificationClassArray), ERMDActionButton.BUTTON_PERFORMED_DELETE_ACTION, null);
      super.awake();
    }
View Full Code Here

     *
     * @see er.extensions.foundation.ERXArrayUtilities
     */
    public void testSortSelectorWithKey() {

        Assert.assertEquals(new NSSelector("random", ERXConstant.ObjectClassArray), ERXArrayUtilities.sortSelectorWithKey("random"));

        Assert.assertNull(ERXArrayUtilities.sortSelectorWithKey(""));

        Assert.assertNull(ERXArrayUtilities.sortSelectorWithKey(null));

        Assert.assertEquals(EOSortOrdering.CompareAscending, ERXArrayUtilities.sortSelectorWithKey("compareAscending"));

        // intended to be same as Assert.assertNotEquals of the above condition. Note that "equals" says the two selectors are equal
        // even when they are of different classes. The equals method was obviously overriden to do this. -rrk
        //
        Assert.assertEquals(new NSSelector("compareAscending", ERXConstant.ObjectClassArray), EOSortOrdering.CompareAscending);
        Assert.assertTrue(! (new NSSelector("compareAscending", ERXConstant.ObjectClassArray)).getClass().equals(EOSortOrdering.CompareAscending.getClass()));

        Assert.assertEquals(new NSSelector("compareCaseInsensitiveAscending", ERXConstant.ObjectClassArray), EOSortOrdering.CompareCaseInsensitiveAscending);
        Assert.assertTrue(! (new NSSelector("compareCaseInsensitiveAscending", ERXConstant.ObjectClassArray)).getClass().equals(EOSortOrdering.CompareCaseInsensitiveAscending.getClass()));

        Assert.assertEquals(new NSSelector("compareCaseInsensitiveDescending", ERXConstant.ObjectClassArray), EOSortOrdering.CompareCaseInsensitiveDescending);
        Assert.assertTrue(! (new NSSelector("compareCaseInsensitiveDescending", ERXConstant.ObjectClassArray)).getClass().equals(EOSortOrdering.CompareCaseInsensitiveDescending.getClass()));

        Assert.assertEquals(new NSSelector("compareDescending", ERXConstant.ObjectClassArray), EOSortOrdering.CompareDescending);
        Assert.assertTrue(! (new NSSelector("compareDescending", ERXConstant.ObjectClassArray)).getClass().equals(EOSortOrdering.CompareDescending.getClass()));
    }
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSSelector

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.