Examples of addConstraint()


Examples of org.araneaframework.uilib.form.constraint.AndConstraint.addConstraint()

   
    //Third searching scenario
    AndConstraint clientAddressConstraint = new AndConstraint();
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressTown")));
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressStreet")));
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressHouse")));
   
    //Combining scenarios
    OrConstraint searchConstraint = new OrConstraint();   
    searchConstraint.addConstraint(clientNameConstraint);
    searchConstraint.addConstraint(clientPersonalIdConstraint);
View Full Code Here

Examples of org.araneaframework.uilib.form.constraint.OrConstraint.addConstraint()

    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressStreet")));
    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressHouse")));
   
    //Combining scenarios
    OrConstraint searchConstraint = new OrConstraint();   
    searchConstraint.addConstraint(clientNameConstraint);
    searchConstraint.addConstraint(clientPersonalIdConstraint);
    searchConstraint.addConstraint(clientAddressConstraint);
   
    //Setting custom error message
    searchConstraint.setCustomErrorMessage(t("searchform.notenoughdata"));
View Full Code Here

Examples of org.araneaframework.uilib.form.constraint.OrConstraint.addConstraint()

    clientAddressConstraint.addConstraint(new NotEmptyConstraint(searchForm.getElementByFullName("clientAddressHouse")));
   
    //Combining scenarios
    OrConstraint searchConstraint = new OrConstraint();   
    searchConstraint.addConstraint(clientNameConstraint);
    searchConstraint.addConstraint(clientPersonalIdConstraint);
    searchConstraint.addConstraint(clientAddressConstraint);
   
    //Setting custom error message
    searchConstraint.setCustomErrorMessage(t("searchform.notenoughdata"));
   
View Full Code Here

Examples of org.araneaframework.uilib.form.constraint.OrConstraint.addConstraint()

   
    //Combining scenarios
    OrConstraint searchConstraint = new OrConstraint();   
    searchConstraint.addConstraint(clientNameConstraint);
    searchConstraint.addConstraint(clientPersonalIdConstraint);
    searchConstraint.addConstraint(clientAddressConstraint);
   
    //Setting custom error message
    searchConstraint.setCustomErrorMessage(t("searchform.notenoughdata"));
   
    //Setting constraint
View Full Code Here

Examples of org.drools.brms.client.modeldriven.brl.CompositeFieldConstraint.addConstraint()

        X.connectives = new ConnectiveConstraint[1];
        X.connectives[0] = new ConnectiveConstraint();
        X.connectives[0].constraintValueType = ConnectiveConstraint.TYPE_LITERAL;
        X.connectives[0].operator = "|| ==";
        X.connectives[0].value = "bar";
        comp.addConstraint( X );

        final SingleFieldConstraint Y = new SingleFieldConstraint();
        Y.fieldName = "goo2";
        Y.constraintValueType = SingleFieldConstraint.TYPE_LITERAL;
        Y.value = "foo";
View Full Code Here

Examples of org.drools.brms.client.modeldriven.brl.FactPattern.addConstraint()

        final SingleFieldConstraint con = new SingleFieldConstraint();
        con.fieldBinding = "f1";
        con.fieldName = "age";
//        con.operator = "<";
//        con.value = "42";
        pat.addConstraint( con );

        m.addLhsItem( pat );

        return m;
    }
View Full Code Here

Examples of org.drools.compiler.lang.descr.PatternDescr.addConstraint()

                                                       "stilton" );
        lhs.addDescr( pattern );

        BindingDescr fieldBindingDescr = new BindingDescr( "x",
                                                           "price" );
        pattern.addConstraint( fieldBindingDescr );
        fieldBindingDescr = new BindingDescr( "y",
                                              "price" );
        pattern.addConstraint( fieldBindingDescr );

        packageDescr.addGlobal( new GlobalDescr( "map",
View Full Code Here

Examples of org.drools.core.rule.Pattern.addConstraint()

        final QueryNameConstraint constraint = new QueryNameConstraint(extractor, queryDescr.getName());

        PatternBuilder.registerReadAccessor( context, queryObjectType, "name", constraint );

        // adds appropriate constraint to the pattern
        pattern.addConstraint( constraint );

        ObjectType argsObjectType = ClassObjectType.DroolsQuery_ObjectType;
       
        InternalReadAccessor arrayExtractor = PatternBuilder.getFieldReadAccessor( context, queryDescr, argsObjectType, "elements", null, true );
View Full Code Here

Examples of org.drools.core.rule.Pattern.addConstraint()

        final QueryNameConstraint constraint = new QueryNameConstraint(extractor, queryDescr.getName());

        PatternBuilder.registerReadAccessor( context, queryObjectType, "name", constraint );

        // adds appropriate constraint to the pattern
        pattern.addConstraint( constraint );

        ObjectType argsObjectType = ClassObjectType.DroolsQuery_ObjectType;
       
        InternalReadAccessor arrayExtractor = PatternBuilder.getFieldReadAccessor( context, queryDescr, argsObjectType, "elements", null, true );
View Full Code Here

Examples of org.drools.factconstraints.client.helper.ConstraintsContainer.addConstraint()

   
    conf = new SimpleConstraintConfigurationImpl();
        conf.setFactType("Person");
        conf.setFieldName("name");
       
        cc.addConstraint(conf);
        assertEquals(2, cc.getConstraints("Person").size());
        assertEquals(1, cc.getConstraints("Person", "age").size());
        assertSame(conf, cc.getConstraints("Person", "name").get(0));
        assertEquals(0, cc.getConstraints("Person", "toothCount").size());
       
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.