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

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


        cloneCEPWindow.setOperator( pattern.getWindow().getOperator() );
        cloneCEPWindow.setParameters( cloneCEPWindowParameters( pattern.getWindow() ) );
        clone.setWindow( cloneCEPWindow );

        for ( FieldConstraint fc : pattern.getFieldConstraints() ) {
            clone.addConstraint( (FieldConstraint) visit( fc ) );
        }
        return clone;
    }

    private Map<String, String> cloneCEPWindowParameters(CEPWindow window) {
View Full Code Here


        con.setValue( "mark" );
        con.setOperator( "==" );
        con.setConstraintValueType( SingleFieldConstraint.TYPE_LITERAL );
        con.setFieldType( SuggestionCompletionEngine.TYPE_STRING );

        p.addConstraint( con );

        m.addLhsItem( p );

        ActionSetField set = new ActionSetField( "p" );
        ActionFieldValue f = new ActionFieldValue( "name",
View Full Code Here

        assertEquals( "val4",
                      items[1] );

        FactPattern pat = new FactPattern( "Fact" );
        SingleFieldConstraint sfc = new SingleFieldConstraint( "field2" );
        pat.addConstraint( sfc );
        items = engine.getEnums( pat.getFactType(),
                                 pat.constraintList,
                                 "field2" ).fixedList;
        assertEquals( 2,
                      items.length );
View Full Code Here

                                           "name" ) );

        FactPattern pat = new FactPattern( "Fact" );
        SingleFieldConstraint f1 = new SingleFieldConstraint( "f1" );
        f1.setValue( "a1" );
        pat.addConstraint( f1 );
        pat.addConstraint( new SingleFieldConstraint( "f2" ) );

        DropDownData data = engine.getEnums( pat.getFactType(),
                                             pat.constraintList,
                                             "f2" );
View Full Code Here

        FactPattern pat = new FactPattern( "Fact" );
        SingleFieldConstraint f1 = new SingleFieldConstraint( "f1" );
        f1.setValue( "a1" );
        pat.addConstraint( f1 );
        pat.addConstraint( new SingleFieldConstraint( "f2" ) );

        DropDownData data = engine.getEnums( pat.getFactType(),
                                             pat.constraintList,
                                             "f2" );
View Full Code Here

                               new String[]{"RED", "WHITE", "BLUE"} );

        FactPattern pat = new FactPattern( "Fact" );
        SingleFieldConstraint sfc = new SingleFieldConstraint( "type" );
        sfc.setValue( "sex" );
        pat.addConstraint( sfc );
        String[] result = sce.getEnums( pat.getFactType(),
                                        pat.constraintList,
                                        "value" ).fixedList;
        assertEquals( 2,
                      result.length );
View Full Code Here

                      result[1] );

        pat = new FactPattern( "Fact" );
        sfc = new SingleFieldConstraint( "type" );
        sfc.setValue( "colour" );
        pat.addConstraint( sfc );

        result = sce.getEnums( pat.getFactType(),
                               pat.constraintList,
                               "value" ).fixedList;
        assertEquals( 3,
View Full Code Here

                               new String[]{"d1", "d2"} );

        FactPattern pat = new FactPattern( "Fact" );
        SingleFieldConstraint sfc = new SingleFieldConstraint( "field1" );
        sfc.setValue( "a1" );
        pat.addConstraint( sfc );
        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "field2" );
        sfc2.setValue( "b1" );
        pat.addConstraint( sfc2 );

        String[] result = sce.getEnums( pat.getFactType(),
View Full Code Here

        SingleFieldConstraint sfc = new SingleFieldConstraint( "field1" );
        sfc.setValue( "a1" );
        pat.addConstraint( sfc );
        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "field2" );
        sfc2.setValue( "b1" );
        pat.addConstraint( sfc2 );

        String[] result = sce.getEnums( pat.getFactType(),
                                        pat.constraintList,
                                        "field3" ).fixedList;
        assertEquals( 3,
View Full Code Here

                               new String[]{"f1", "f2"} );

        FactPattern pat = new FactPattern( "Fact" );
        SingleFieldConstraint sfc = new SingleFieldConstraint( "field1" );
        sfc.setValue( "a1" );
        pat.addConstraint( sfc );
        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "field2" );
        sfc2.setValue( "b2" );
        pat.addConstraint( sfc2 );
        SingleFieldConstraint sfc3 = new SingleFieldConstraint( "field3" );
        sfc3.setValue( "c3" );
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.