Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSSelector


        return false;
    }

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


     * constructor so unless you call stop(), there is no need to ever call this method.
   * @see #stop()
     */
  public void start() {
    // Catch this to disable caching before application did finish to start (and most importantly processed migrations)
    NSSelector selector = ERXSelectorUtilities.notificationSelector("enableFetchingOfInitialValues");
    NSNotificationCenter.defaultCenter().addObserver(this, selector,
            ERXApplication.ApplicationDidFinishInitializationNotification, null);
   
    // Catch this to update the cache when an object is changed
    selector = ERXSelectorUtilities.notificationSelector("editingContextDidSaveChanges");
View Full Code Here

   * @author David Avendasora
   */
  public ERXSortOrdering prefix(EOSortOrdering sortOrder) {
    String keyPathToChain = sortOrder.key();
    String fullKeyPath = append(keyPathToChain).key();
    NSSelector selector = sortOrder.selector();
    ERXSortOrdering prefixedSortOrdering = ERXS.sortOrder(fullKeyPath, selector);
    return prefixedSortOrdering;
  }
View Full Code Here

   * <a href="http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf">Java Object Serialization Spec</a>
   */
  private static final long serialVersionUID = 1L;

  public ERXQuicksilverQualifier(String key, Object value) {
    super(key, new NSSelector("quicksilverContains:"), value);
  }
View Full Code Here

        }
      configureTraceRuleFiringRapidTurnAround();
      ERDirectToWeb.warmUpRuleCache();
        model.checkRules();
      NSNotificationCenter.defaultCenter().addObserver(this,
              new NSSelector("resetModel",
                      ERXConstant.NotificationClassArray),
                      ERXLocalizer.LocalizationDidResetNotification,
              null);
      NSNotificationCenter.defaultCenter().addObserver(this,
          new NSSelector("sortRules",
              ERXConstant.NotificationClassArray),
              ERD2WModel.WillSortRules,
              null);
    }
View Full Code Here

            // Note: If the configuration file says debug, but the command line parameter doesn't we need to turn
            //   rule tracing on.
            // BOOGIE
            configureTraceRuleFiring();
            NSNotificationCenter.defaultCenter().addObserver(ERXFrameworkPrincipal.sharedInstance(ERDirectToWeb.class),
                                                             new NSSelector("configureTraceRuleFiring",
                                                                            ERXConstant.NotificationClassArray),
                                                             ERXConfigurationManager.ConfigurationDidChangeNotification,
                                                             null);
        }
    }
View Full Code Here

      ec.unlock();
    }
  }

  protected void registerForNotifications() {
    NSSelector selector = ERXSelectorUtilities.notificationSelector("editingContextDidSaveChanges");
    NSNotificationCenter.defaultCenter().addObserver(this, selector, EOEditingContext.EditingContextDidSaveChangesNotification, null);
    selector = ERXSelectorUtilities.notificationSelector("clearCache");
    NSNotificationCenter.defaultCenter().addObserver(this, selector, ERXEnterpriseObjectChangeListener.ClearCacheNotification, null);
  }
View Full Code Here

            if(_validationInfo != null) {
                NSArray additionalValidationKeys = (NSArray)_validationInfo.objectForKey("additionalValidationKeys");
                if(additionalValidationKeys != null) {
                    for(Enumeration e = additionalValidationKeys.objectEnumerator(); e.hasMoreElements();) {
                        String key = (String)e.nextElement();
                        NSSelector selector = new NSSelector(key);
                        if(selector.implementedByObject(obj)) {
                            try {
                                selector.invoke(obj);
                            } catch (Exception ex) {
                                if(ex instanceof NSValidation.ValidationException)
                                    throw (NSValidation.ValidationException)ex;
                                log.error(ex);
                            }
View Full Code Here

  public static final String RESET_ALL_ENTITIES = "EREntityStoreResetAllEntities";
 
  public EREntityStoreFactory(Class<? extends EREntityStore> clazz) {
    _entityStores = new NSMutableDictionary<String, EREntityStore>();
    _entityStoreClazz = clazz;
    NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("resetAllEntities", new Class[] { NSNotification.class }), RESET_ALL_ENTITIES, null);
  }
View Full Code Here

              attribute = entity.attributeNamed(attributeName);
              if(attribute != null) {
                String stringValue = context().request().stringFormValueForKey(key);
                if(stringValue != null) {
                  Object value = null;
                  NSSelector selector = EOKeyValueQualifier.QualifierOperatorEqual;
                  if(stringValue.indexOf('*') >= 0) {
                    selector = EOKeyValueQualifier.QualifierOperatorCaseInsensitiveLike;
                  }
                  if(!NSKeyValueCoding.NullValue.toString().equals(stringValue)) {
                                    //AK: I still don't like this...in particular the new NSTimestampFormatter() which would be totally arbitrary...
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.