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

Examples of org.drools.ide.common.client.modeldriven.dt.ConditionCol


        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );

        List<ConditionCol> cols = new ArrayList<ConditionCol>();

        ConditionCol col = new ConditionCol();
        col.setBoundName( "p1" );
        col.setFactType( "Person" );
        col.setFactField( "alive" );
        col.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col.setFieldType( SuggestionCompletionEngine.TYPE_BOOLEAN );
        col.setOperator( "==" );
        cols.add( col );

        ConditionCol col2 = new ConditionCol();
        col2.setBoundName( "p2" );
        col2.setFactType( "Person" );
        col2.setFactField( "alive" );
        col2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col2.setFieldType( SuggestionCompletionEngine.TYPE_BOOLEAN );
        col2.setOperator( "!=" );
        cols.add( col2 );

        RuleModel rm = new RuleModel();
        allColumns.addAll( cols );
View Full Code Here


        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );

        List<ConditionCol> cols = new ArrayList<ConditionCol>();

        ConditionCol col = new ConditionCol();
        col.setBoundName( "p1" );
        col.setFactType( "Person" );
        col.setFactField( "dateOfBirth" );
        col.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col.setFieldType( SuggestionCompletionEngine.TYPE_DATE );
        col.setOperator( "==" );
        cols.add( col );

        ConditionCol col2 = new ConditionCol();
        col2.setBoundName( "p2" );
        col2.setFactType( "Person" );
        col2.setFactField( "dateOfBirth" );
        col2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col2.setFieldType( SuggestionCompletionEngine.TYPE_DATE );
        col2.setOperator( "!=" );
        cols.add( col2 );

        RuleModel rm = new RuleModel();
        allColumns.addAll( cols );
View Full Code Here

        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );

        List<ConditionCol> cols = new ArrayList<ConditionCol>();

        ConditionCol col = new ConditionCol();
        col.setBoundName( "p1" );
        col.setFactType( "Person" );
        col.setFactField( "age" );
        col.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col.setFieldType( SuggestionCompletionEngine.TYPE_NUMERIC );
        col.setOperator( "==" );
        cols.add( col );

        ConditionCol col2 = new ConditionCol();
        col2.setBoundName( "p2" );
        col2.setFactType( "Person" );
        col2.setFactField( "age" );
        col2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col2.setFieldType( SuggestionCompletionEngine.TYPE_NUMERIC );
        col2.setOperator( "!=" );
        cols.add( col2 );

        RuleModel rm = new RuleModel();
        allColumns.addAll( cols );
View Full Code Here

        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );

        List<ConditionCol> cols = new ArrayList<ConditionCol>();

        ConditionCol col = new ConditionCol();
        col.setBoundName( "p1" );
        col.setFactType( "Person" );
        col.setFactField( "name" );
        col.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        col.setOperator( "==" );
        cols.add( col );

        ConditionCol col2 = new ConditionCol();
        col2.setBoundName( "p2" );
        col2.setFactType( "Person" );
        col2.setFactField( "name" );
        col2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col2.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        col2.setOperator( "!=" );
        cols.add( col2 );

        RuleModel rm = new RuleModel();
        allColumns.addAll( cols );
View Full Code Here

    }

    @Test
    public void testNoConstraints() {
        TypeSafeGuidedDecisionTable dt = new TypeSafeGuidedDecisionTable();
        ConditionCol c = new ConditionCol();
        c.setBoundName( "x" );
        c.setFactType( "Context" );
        c.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        dt.getConditionCols().add( c );
        ActionSetFieldCol asf = new ActionSetFieldCol();
        asf.setBoundName( "x" );
        asf.setFactField( "age" );
        asf.setType( SuggestionCompletionEngine.TYPE_STRING );
View Full Code Here

        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );
        allColumns.add( new MetadataCol() );
        List<ConditionCol> cols = new ArrayList<ConditionCol>();

        ConditionCol col2 = new ConditionCol();
        col2.setBoundName( "p1" );
        col2.setFactType( "Person" );
        col2.setFactField( "age" );
        col2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        col2.setOperator( "" );
        cols.add( col2 );

        RuleModel rm = new RuleModel();
        allColumns.addAll( cols );
View Full Code Here

        List<DTColumnConfig> allColumns = new ArrayList<DTColumnConfig>();
        allColumns.add( new RowNumberCol() );
        allColumns.add( new DescriptionCol() );
        allColumns.add( new MetadataCol() );
        allColumns.add( new ConditionCol() );
        List<ActionCol> cols = new ArrayList<ActionCol>();

        ActionSetFieldCol asf1 = new ActionSetFieldCol();
        asf1.setBoundName( "a" );
        asf1.setFactField( "field1" );
View Full Code Here

    }

    @Test
    public void testUpdateModify() {
        TypeSafeGuidedDecisionTable dt = new TypeSafeGuidedDecisionTable();
        ConditionCol c = new ConditionCol();
        c.setBoundName( "x" );
        c.setFactType( "Context" );
        c.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        dt.getConditionCols().add( c );
        ActionSetFieldCol asf = new ActionSetFieldCol();
        asf.setBoundName( "x" );
        asf.setFactField( "age" );
        asf.setType( SuggestionCompletionEngine.TYPE_NUMERIC );
View Full Code Here

        AttributeCol attr = new AttributeCol();
        attr.setAttribute( "salience" );
        attr.setDefaultValue( "66" );
        dt.getAttributeCols().add( attr );

        ConditionCol con = new ConditionCol();
        con.setBoundName( "f1" );
        con.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        con.setFactField( "age" );
        con.setFactType( "Driver" );
        con.setHeader( "Driver f1 age" );
        con.setOperator( "==" );
        dt.getConditionCols().add( con );

        ConditionCol con2 = new ConditionCol();
        con2.setBoundName( "f1" );
        con2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        con2.setFactField( "name" );
        con2.setFactType( "Driver" );
        con2.setHeader( "Driver f1 name" );
        con2.setOperator( "==" );
        dt.getConditionCols().add( con2 );

        ConditionCol con3 = new ConditionCol();
        con3.setBoundName( "f1" );
        con3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_RET_VALUE );
        con3.setFactField( "rating" );
        con3.setFactType( "Driver" );
        con3.setHeader( "Driver rating" );
        con3.setOperator( "==" );
        dt.getConditionCols().add( con3 );

        ConditionCol con4 = new ConditionCol();
        con4.setBoundName( "f2" );
        con4.setConstraintValueType( BaseSingleFieldConstraint.TYPE_PREDICATE );
        con4.setFactType( "Driver" );
        con4.setHeader( "Driver 2 pimp" );
        con4.setFactField( "(not needed)" );
        dt.getConditionCols().add( con4 );

        ActionInsertFactCol ins = new ActionInsertFactCol();
        ins.setBoundName( "ins" );
        ins.setFactType( "Cheese" );
View Full Code Here

        AttributeCol attr = new AttributeCol();
        attr.setAttribute( "salience" );
        attr.setDefaultValue( "66" );
        dt.getAttributeCols().add( attr );

        ConditionCol con = new ConditionCol();
        con.setBoundName( "f1" );
        con.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        con.setFactField( "age" );
        con.setFactType( "Driver" );
        con.setHeader( "Driver f1 age" );
        con.setOperator( "==" );
        dt.getConditionCols().add( con );

        ConditionCol con2 = new ConditionCol();
        con2.setBoundName( "f1" );
        con2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        con2.setFactField( "name" );
        con2.setFactType( "Driver" );
        con2.setHeader( "Driver f1 name" );
        con2.setOperator( "==" );
        dt.getConditionCols().add( con2 );

        ConditionCol con3 = new ConditionCol();
        con3.setBoundName( "f1" );
        con3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_RET_VALUE );
        con3.setFactField( "rating" );
        con3.setFactType( "Driver" );
        con3.setHeader( "Driver rating" );
        con3.setOperator( "==" );
        dt.getConditionCols().add( con3 );

        ConditionCol con4 = new ConditionCol();
        con4.setBoundName( "f2" );
        con4.setConstraintValueType( BaseSingleFieldConstraint.TYPE_PREDICATE );
        con4.setFactType( "Driver" );
        con4.setHeader( "Driver 2 pimp" );
        con4.setFactField( "(not needed)" );
        dt.getConditionCols().add( con4 );

        ActionInsertFactCol ins = new ActionInsertFactCol();
        ins.setBoundName( "ins" );
        ins.setFactType( "Cheese" );
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.dt.ConditionCol

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.