Package com.webobjects.eocontrol

Examples of com.webobjects.eocontrol.EOQualifierEvaluation


            return qualifier.evaluateWithObject(o);
        }
    }
   
    protected boolean validateObjectValueDictWithInfo(ValidationObjectValue values, NSDictionary info, String cacheKey) {
        EOQualifierEvaluation q = (EOQualifierEvaluation)_validationQualiferCache.objectForKey(cacheKey);
        if(q == null) {
            try {
                String className = (String)info.objectForKey("className");
                if(className == null) {
                    className = QualiferValidation.class.getName();
                }
                Class cl = ERXPatcher.classForName(className);
                Constructor co = cl.getConstructor(new Class [] {Object.class});
                Object o = co.newInstance(new Object[] {info});
                q = (EOQualifierEvaluation)o;
            } catch(Exception ex) {
                throw new NSForwardException(ex);
            }
            _validationQualiferCache.setObjectForKey(q, cacheKey);
        }
        if(values.value() == null && "true".equals(info.objectForKey("ignoreIfNull")))
           return true;
        if(q != null)
            return q.evaluateWithObject(values);
        return true;
    }
View Full Code Here


                    log.debug("Out of : " + c + " rules, qualifiers: " + totalQualifiers + " duplicates: "
                              + uniquedQualifiers + " replaced: " + replacedQualifiers);
               
                Rule r = (Rule)rules.objectAtIndex(c);
                if (r != null && r.lhs() != null) {
                    EOQualifierEvaluation q = r.lhs();
                    try {
                        EOQualifier cache = qualifierInCache((EOQualifier)q);
                        if (cache != null && cache != q) {
                            r.setLhs(cache);
                            //r.setLhs((EOQualifierEvaluation)cache);
View Full Code Here

  }

    protected EOQualifier qualifierContainedInEnumeration(EOQualifierEvaluation q1, Enumeration e) {
        EOQualifier containedQualifier = null;
        while (e.hasMoreElements()) {
            EOQualifierEvaluation q2 = (EOQualifierEvaluation)e.nextElement();
            if (q1.equals(q2)) {
                containedQualifier = (EOQualifier)q2; break;
            }
        }
        if (containedQualifier != null && q1 != containedQualifier)
View Full Code Here

        NSArray rules = (NSArray)value();
        Enumeration ruleEnumerator = rules.objectEnumerator();
        Rule rule;
        while (ruleEnumerator.hasMoreElements()) {
            rule = (Rule)ruleEnumerator.nextElement();
            EOQualifierEvaluation eval = rule.lhs();
            log.debug("Qualifier eval: \n" + eval);
            if (eval.evaluateWithObject(c)) {
                result = rule.rhs().value();
                log.debug("RHS value: " +  result);
                break;
            }
            log.debug("    object.expansionRSF:" +
View Full Code Here

  }

  public static ComponentClazz clazz = new ComponentClazz();

    public NSArray openBugs() {
        return ERXArrayUtilities.filteredArrayWithQualifierEvaluation(bugs(), new EOQualifierEvaluation() {
            public boolean evaluateWithObject(Object object) {
                State state = ((Bug)object).state();
                return !(state.equals(State.CLOSED) || state.equals(State.DOCUMENT));
            }
           
View Full Code Here

           
        });
    }

    public NSArray openRequirements() {
        return ERXArrayUtilities.filteredArrayWithQualifierEvaluation(requirements(), new EOQualifierEvaluation() {
            public boolean evaluateWithObject(Object object) {
                State state = ((Bug)object).state();
                return !(state.equals(State.CLOSED) || state.equals(State.DOCUMENT));
            }
           
View Full Code Here

TOP

Related Classes of com.webobjects.eocontrol.EOQualifierEvaluation

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.