Package org.drools.ide.common.client.modeldriven.brl

Examples of org.drools.ide.common.client.modeldriven.brl.ConnectiveConstraint


        String valueType;
        if ( constraint instanceof SingleFieldConstraintEBLeftSide ) {
            SingleFieldConstraintEBLeftSide sfexp = (SingleFieldConstraintEBLeftSide) constraint;
            valueType = sfexp.getExpressionLeftSide().getGenericType();
        } else if ( constraint instanceof ConnectiveConstraint ) {
            ConnectiveConstraint cc = (ConnectiveConstraint) constraint;
            valueType = cc.getFieldType();
        } else {
            valueType = sce.getFieldType( pattern.getFactType(),
                                          fieldName );
        }
View Full Code Here


    X.setFieldName("goo");
    X.setConstraintValueType(SingleFieldConstraint.TYPE_LITERAL);
    X.setValue("foo");
    X.setOperator("==");
    X.connectives = new ConnectiveConstraint[1];
    X.connectives[0] = new ConnectiveConstraint();
    X.connectives[0].setConstraintValueType(ConnectiveConstraint.TYPE_LITERAL);
    X.connectives[0].operator = "|| ==";
    X.connectives[0].setValue("bar");
    comp.addConstraint(X);
View Full Code Here

    con.setOperator("==");
    con.setValue("goo");
    con.setConstraintValueType(SingleFieldConstraint.TYPE_VARIABLE);
    p.addConstraint(con);

    ConnectiveConstraint connective = new ConnectiveConstraint();
    connective.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
    connective.operator = "|| ==";
    connective.setValue("blah");

    con.connectives = new ConnectiveConstraint[1];
    con.connectives[0] = connective;

    m.addLhsItem(p);
View Full Code Here

        X.setFieldName("goo");
        X.setConstraintValueType(SingleFieldConstraint.TYPE_LITERAL);
        X.setValue("foo");
        X.setOperator("==");
        X.connectives = new ConnectiveConstraint[1];
        X.connectives[0] = new ConnectiveConstraint();
        X.connectives[0].setConstraintValueType(ConnectiveConstraint.TYPE_LITERAL);
        X.connectives[0].operator = "|| ==";
        X.connectives[0].setValue("bar");
        comp.addConstraint( X );
View Full Code Here

    y.constraintList.constraints = cons;
    cons[0] = new SingleFieldConstraint("age");
    cons[0].setFieldBinding("qbc");
    cons[0].setFieldType("String");
    cons[0].connectives = new ConnectiveConstraint[1];
    cons[0].connectives[0] = new ConnectiveConstraint("age", "String", "&", "x");
    cons[0].connectives[0].setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
    cons[1] = new SingleFieldConstraint("make");
    cons[1].setFieldType("Long");
    cons[1].connectives = new ConnectiveConstraint[1];
    cons[1].connectives[0] = new ConnectiveConstraint("make", "Long", "=", "2");
    cons[1].connectives[0].setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);


    final FactPattern other = new FactPattern("House");
    model.lhs[2] = other;
View Full Code Here

    y.constraintList.constraints = cons;
    cons[0] = new SingleFieldConstraint("age");
    cons[1] = new SingleFieldConstraint("make");
    cons[0].setFieldBinding("qbc");
    cons[0].connectives = new ConnectiveConstraint[1];
    cons[0].connectives[0] = new ConnectiveConstraint("age", null, "&", "x");
    cons[0].connectives[0].setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);

    final FactPattern other = new FactPattern("House");
    model.lhs[2] = other;
    other.boundName = "q";
View Full Code Here

    y.constraintList.constraints = cons;
    cons[0] = new SingleFieldConstraint("age");
    cons[0].setFieldBinding("qbc");
    cons[0].setFieldType("String");
    cons[0].connectives = new ConnectiveConstraint[1];
    cons[0].connectives[0] = new ConnectiveConstraint("age", "String", "&", "x");
    cons[0].connectives[0].setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
    cons[1] = new SingleFieldConstraint("make");
    cons[1].setFieldType("Long");
    cons[1].connectives = new ConnectiveConstraint[1];
    cons[1].connectives[0] = new ConnectiveConstraint("make", "Long", "=", "2");
    cons[1].connectives[0].setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);

    final FactPattern other = new FactPattern("House");
    model.lhs[2] = other;
    other.boundName = "q";
View Full Code Here

    public Widget connectives(SingleFieldConstraint c, String factClass) {
        if ( c.connectives != null && c.connectives.length > 0 ) {
            DirtyableHorizontalPane horiz = new DirtyableHorizontalPane();
            for ( int i = 0; i < c.connectives.length; i++ ) {
                ConnectiveConstraint con = c.connectives[i];
                horiz.add( connectiveOperatorDropDown( con, c.getFieldName() ) );
                horiz.add( connectiveValueEditor( con, factClass, c.getFieldName() ) );
            }
            return horiz;
        } else {
View Full Code Here

        X.fieldName = "goo";
        X.constraintValueType = SingleFieldConstraint.TYPE_LITERAL;
        X.value = "foo";
        X.operator = "==";
        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 );
View Full Code Here

    X.fieldName = "goo";
    X.constraintValueType = SingleFieldConstraint.TYPE_LITERAL;
    X.value = "foo";
    X.operator = "==";
    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);
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.brl.ConnectiveConstraint

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.