Package org.drools.workbench.models.datamodel.rule

Examples of org.drools.workbench.models.datamodel.rule.FactPattern.addConstraint()


        X.setFieldName( "field1" );
        X.setFieldType( DataType.TYPE_STRING );
        X.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        X.setValue( "$f1" );
        X.setOperator( "==" );
        p1.addConstraint( X );

        ConnectiveConstraint connective = new ConnectiveConstraint();
        connective.setConstraintValueType( BaseSingleFieldConstraint.TYPE_TEMPLATE );
        connective.setFieldType( DataType.TYPE_STRING );
        connective.setOperator( "|| ==" );
View Full Code Here


        sfc.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc.setFieldType( DataType.TYPE_STRING );
        sfc.setOperator( "==" );
        sfc.setValue( "$f1" );

        fp.addConstraint( sfc );

        FromCollectCompositeFactPattern fac = new FromCollectCompositeFactPattern();
        fac.setRightPattern( fp );
        fac.setFactPattern( new FactPattern( "java.util.List" ) );
        m.addLhsItem( fac );
View Full Code Here

        SingleFieldConstraint sfc = new SingleFieldConstraint( "field1" );
        sfc.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc.setFieldType( DataType.TYPE_STRING );
        sfc.setOperator( "==" );
        sfc.setValue( "$f1" );
        fp.addConstraint( sfc );

        FactPattern fp2 = new FactPattern( "java.util.List" );
        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "size" );
        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
View Full Code Here

        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "size" );
        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        sfc2.setOperator( ">" );
        sfc2.setValue( "$f2" );
        fp2.addConstraint( sfc2 );

        FromCollectCompositeFactPattern fac = new FromCollectCompositeFactPattern();
        fac.setRightPattern( fp );
        fac.setFactPattern( fp2 );
        m.addLhsItem( fac );
View Full Code Here

        SingleFieldConstraint sfc = new SingleFieldConstraint( "field1" );
        sfc.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc.setFieldType( DataType.TYPE_STRING );
        sfc.setOperator( "==" );
        sfc.setValue( "$f1" );
        fp.addConstraint( sfc );

        FactPattern fp2 = new FactPattern( "java.util.List" );
        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "size" );
        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
View Full Code Here

        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "size" );
        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        sfc2.setOperator( ">" );
        sfc2.setValue( "$f2" );
        fp2.addConstraint( sfc2 );

        FromCollectCompositeFactPattern fac = new FromCollectCompositeFactPattern();
        fac.setRightPattern( fp );
        fac.setFactPattern( fp2 );
        m.addLhsItem( fac );
View Full Code Here

        SingleFieldConstraint sfc = new SingleFieldConstraint( "field1" );
        sfc.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc.setFieldType( DataType.TYPE_STRING );
        sfc.setOperator( "==" );
        sfc.setValue( "$f1" );
        fp.addConstraint( sfc );

        FactPattern fp2 = new FactPattern( "java.util.List" );
        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "size" );
        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
View Full Code Here

        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "size" );
        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        sfc2.setOperator( ">" );
        sfc2.setValue( "$f2" );
        fp2.addConstraint( sfc2 );

        FromCollectCompositeFactPattern fac = new FromCollectCompositeFactPattern();
        fac.setRightPattern( fp );
        fac.setFactPattern( fp2 );
        m.addLhsItem( fac );
View Full Code Here

        SingleFieldConstraint sfc = new SingleFieldConstraint( "field1" );
        sfc.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc.setFieldType( DataType.TYPE_STRING );
        sfc.setOperator( "==" );
        sfc.setValue( "$f1" );
        fp.addConstraint( sfc );

        SingleFieldConstraint sfc1 = new SingleFieldConstraint( "field2" );
        sfc1.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc1.setFieldType( DataType.TYPE_STRING );
        sfc1.setOperator( "==" );
View Full Code Here

        SingleFieldConstraint sfc1 = new SingleFieldConstraint( "field2" );
        sfc1.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc1.setFieldType( DataType.TYPE_STRING );
        sfc1.setOperator( "==" );
        sfc1.setValue( "$f2" );
        fp.addConstraint( sfc1 );

        FactPattern fp2 = new FactPattern( "java.util.List" );
        SingleFieldConstraint sfc2 = new SingleFieldConstraint( "size" );
        sfc2.setConstraintValueType( SingleFieldConstraint.TYPE_TEMPLATE );
        sfc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
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.