Package org.drools.brms.client.modeldriven.brl

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


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

        m.addLhsItem( pat );

        final CompositeFactPattern comp = new CompositeFactPattern( "not" );
        comp.addFactPattern( new FactPattern( "Cancel" ) );
View Full Code Here

        FactPattern p = new FactPattern("Goober");
        m.addLhsItem( p );
        CompositeFieldConstraint comp = new CompositeFieldConstraint();
        comp.compositeJunctionType = CompositeFieldConstraint.COMPOSITE_TYPE_OR;
        p.addConstraint( comp );

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

        Z.fieldName = "goo3";
        Z.constraintValueType = SingleFieldConstraint.TYPE_LITERAL;
        Z.value = "foo";
        Z.operator = "==";

        p.addConstraint( Z );

        ActionInsertFact ass = new ActionInsertFact("Whee");
        m.addRhsItem( ass );

        String actual = BRDRLPersistence.getInstance().marshal( m );
View Full Code Here

        FactPattern p = new FactPattern();
        p.factType = "Person";

        //this isn't an effective constraint, so it should be ignored.
        p.addConstraint( new SingleFieldConstraint("field1") );

        m.addLhsItem( p );

        String actual = BRDRLPersistence.getInstance().marshal( m );
View Full Code Here

        SingleFieldConstraint con = new SingleFieldConstraint();
        con.fieldName = "field1";
        con.operator = "==";
        con.value = "goo";
        con.constraintValueType = SingleFieldConstraint.TYPE_LITERAL;
        p.addConstraint( con );


        SingleFieldConstraint con2 = new SingleFieldConstraint();
        con2.fieldName = "field2";
        con2.operator = "==";
View Full Code Here

        SingleFieldConstraint con2 = new SingleFieldConstraint();
        con2.fieldName = "field2";
        con2.operator = "==";
        con2.value = "variableHere";
        con2.constraintValueType = SingleFieldConstraint.TYPE_VARIABLE;
        p.addConstraint( con2 );



        m.addLhsItem( p );
View Full Code Here

        con.value = "someFunc(x)";
        con.operator = "==";
        con.fieldName = "goo";
        p.factType = "Goober";

        p.addConstraint( con );
        m.addLhsItem( p );

        String actual = BRDRLPersistence.getInstance().marshal( m );
        //System.err.println(actual);
View Full Code Here

        con.constraintValueType = SingleFieldConstraint.TYPE_PREDICATE;
        con.value = "field soundslike 'poo'";

        p.factType = "Goober";

        p.addConstraint( con );
        m.addLhsItem( p );

        String actual = BRDRLPersistence.getInstance().marshal( m );
        //System.err.println(actual);
View Full Code Here

        SingleFieldConstraint con = new SingleFieldConstraint();
        con.fieldName = "field1";
        con.operator = "==";
        con.value = "goo";
        con.constraintValueType = SingleFieldConstraint.TYPE_VARIABLE;
        p.addConstraint( con );

        ConnectiveConstraint connective = new ConnectiveConstraint();
        connective.constraintValueType = ISingleFieldConstraint.TYPE_LITERAL;
        connective.operator = "|| ==";
        connective.value = "blah";
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.