Package org.drools.workbench.models.guided.dtable.shared.model.legacy

Examples of org.drools.workbench.models.guided.dtable.shared.model.legacy.ConditionCol


        //fields to a *sensible* default of String (as this matches legacy behaviour).
        List<Pattern52> patterns = new ArrayList<Pattern52>();
        Map<String, Pattern52> uniquePatterns = new HashMap<String, Pattern52>();
        if ( legacyDTModel.conditionCols != null ) {
            for ( int i = 0; i < legacyDTModel.conditionCols.size(); i++ ) {
                ConditionCol c = legacyDTModel.conditionCols.get( i );
                String boundName = c.boundName;
                Pattern52 p = uniquePatterns.get( boundName );
                if ( p == null ) {
                    p = new Pattern52();
                    p.setBoundName( boundName );
View Full Code Here


        final int DATA_ROWS = model.data.length;

        // Copy conditions and related data into temporary groups
        for ( int iCol = 0; iCol < model.conditionCols.size(); iCol++ ) {

            ConditionCol col = model.conditionCols.get( iCol );
            String pattern = col.boundName + "";
            List<ConditionColData> groupCols = uniqueGroups.get( pattern );
            if ( groupCols == null ) {
                groupCols = new ArrayList<ConditionColData>();
                groups.add( groupCols );
View Full Code Here

        AttributeCol attr = new AttributeCol();
        attr.attr = "salience";
        attr.defaultValue = "66";
        dt.attributeCols.add( attr );

        ConditionCol con = new ConditionCol();
        con.boundName = "f1";
        con.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con.factField = "age";
        con.factType = "Driver";
        con.header = "Driver f1 age";
        con.operator = "==";
        dt.conditionCols.add( con );

        ConditionCol con2 = new ConditionCol();
        con2.boundName = "f1";
        con2.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con2.factField = "name";
        con2.factType = "Driver";
        con2.header = "Driver f1 name";
        con2.operator = "==";
        dt.conditionCols.add( con2 );

        ConditionCol con3 = new ConditionCol();
        con3.boundName = "f1";
        con3.constraintValueType = BaseSingleFieldConstraint.TYPE_RET_VALUE;
        con3.factField = "rating";
        con3.factType = "Driver";
        con3.header = "Driver rating";
        con3.operator = "==";
        dt.conditionCols.add( con3 );

        ConditionCol con4 = new ConditionCol();
        con4.boundName = "f2";
        con4.constraintValueType = BaseSingleFieldConstraint.TYPE_PREDICATE;
        con4.factType = "Driver";
        con4.header = "Driver 2 pimp";
        con4.factField = "(not needed)";
View Full Code Here

        AttributeCol attr = new AttributeCol();
        attr.attr = "salience";
        attr.defaultValue = "66";
        dt.attributeCols.add( attr );

        ConditionCol con = new ConditionCol();
        con.boundName = "f1";
        con.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con.factField = "age";
        con.factType = "Driver";
        con.header = "Driver f1 age";
        con.operator = "==";
        dt.conditionCols.add( con );

        ConditionCol con2 = new ConditionCol();
        con2.boundName = "f2";
        con2.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con2.factField = "name";
        con2.factType = "Person";
        con2.header = "Person f2 name";
        con2.operator = "==";
        dt.conditionCols.add( con2 );

        ConditionCol con3 = new ConditionCol();
        con3.boundName = "f1";
        con3.constraintValueType = BaseSingleFieldConstraint.TYPE_RET_VALUE;
        con3.factField = "rating";
        con3.factType = "Driver";
        con3.header = "Driver rating";
        con3.operator = "==";
        dt.conditionCols.add( con3 );

        ConditionCol con4 = new ConditionCol();
        con4.boundName = "f2";
        con4.constraintValueType = BaseSingleFieldConstraint.TYPE_PREDICATE;
        con4.factType = "Person";
        con4.header = "Person f2 not needed";
        con4.factField = "(not needed)";
View Full Code Here

    public void testConversionPatternGrouping2() {

        GuidedDecisionTable dt = new GuidedDecisionTable();
        dt.tableName = "michael";

        ConditionCol con = new ConditionCol();
        con.boundName = "z1";
        con.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con.factField = "age";
        con.factType = "Driver";
        con.header = "Driver z1 age";
        con.operator = "==";
        dt.conditionCols.add( con );

        ConditionCol con2 = new ConditionCol();
        con2.boundName = "f1";
        con2.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con2.factField = "name";
        con2.factType = "Person";
        con2.header = "Person f1 name";
        con2.operator = "==";
        dt.conditionCols.add( con2 );

        ConditionCol con3 = new ConditionCol();
        con3.boundName = "z1";
        con3.constraintValueType = BaseSingleFieldConstraint.TYPE_RET_VALUE;
        con3.factField = "rating";
        con3.factType = "Driver";
        con3.header = "Driver rating";
        con3.operator = "==";
        dt.conditionCols.add( con3 );

        ConditionCol con4 = new ConditionCol();
        con4.boundName = "f2";
        con4.constraintValueType = BaseSingleFieldConstraint.TYPE_PREDICATE;
        con4.factType = "Person2";
        con4.header = "Person2 f2 not needed";
        con4.factField = "(not needed)";
View Full Code Here

        //fields to a *sensible* default of String (as this matches legacy behaviour).
        List<Pattern52> patterns = new ArrayList<Pattern52>();
        Map<String, Pattern52> uniquePatterns = new HashMap<String, Pattern52>();
        if ( legacyDTModel.conditionCols != null ) {
            for ( int i = 0; i < legacyDTModel.conditionCols.size(); i++ ) {
                ConditionCol c = legacyDTModel.conditionCols.get( i );
                String boundName = c.boundName;
                Pattern52 p = uniquePatterns.get( boundName );
                if ( p == null ) {
                    p = new Pattern52();
                    p.setBoundName( boundName );
View Full Code Here

        final int DATA_ROWS = model.data.length;

        // Copy conditions and related data into temporary groups
        for ( int iCol = 0; iCol < model.conditionCols.size(); iCol++ ) {

            ConditionCol col = model.conditionCols.get( iCol );
            String pattern = col.boundName + "";
            List<ConditionColData> groupCols = uniqueGroups.get( pattern );
            if ( groupCols == null ) {
                groupCols = new ArrayList<ConditionColData>();
                groups.add( groupCols );
View Full Code Here

        //fields to a *sensible* default of String (as this matches legacy behaviour).
        List<Pattern52> patterns = new ArrayList<Pattern52>();
        Map<String, Pattern52> uniquePatterns = new HashMap<String, Pattern52>();
        if ( legacyDTModel.conditionCols != null ) {
            for ( int i = 0; i < legacyDTModel.conditionCols.size(); i++ ) {
                ConditionCol c = legacyDTModel.conditionCols.get( i );
                String boundName = c.boundName;
                Pattern52 p = uniquePatterns.get( boundName );
                if ( p == null ) {
                    p = new Pattern52();
                    p.setBoundName( boundName );
View Full Code Here

        final int DATA_ROWS = model.data.length;

        // Copy conditions and related data into temporary groups
        for ( int iCol = 0; iCol < model.conditionCols.size(); iCol++ ) {

            ConditionCol col = model.conditionCols.get( iCol );
            String pattern = col.boundName + "";
            List<ConditionColData> groupCols = uniqueGroups.get( pattern );
            if ( groupCols == null ) {
                groupCols = new ArrayList<ConditionColData>();
                groups.add( groupCols );
View Full Code Here

        AttributeCol attr = new AttributeCol();
        attr.attr = "salience";
        attr.defaultValue = "66";
        dt.attributeCols.add( attr );

        ConditionCol con = new ConditionCol();
        con.boundName = "f1";
        con.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con.factField = "age";
        con.factType = "Driver";
        con.header = "Driver f1 age";
        con.operator = "==";
        dt.conditionCols.add( con );

        ConditionCol con2 = new ConditionCol();
        con2.boundName = "f1";
        con2.constraintValueType = BaseSingleFieldConstraint.TYPE_LITERAL;
        con2.factField = "name";
        con2.factType = "Driver";
        con2.header = "Driver f1 name";
        con2.operator = "==";
        dt.conditionCols.add( con2 );

        ConditionCol con3 = new ConditionCol();
        con3.boundName = "f1";
        con3.constraintValueType = BaseSingleFieldConstraint.TYPE_RET_VALUE;
        con3.factField = "rating";
        con3.factType = "Driver";
        con3.header = "Driver rating";
        con3.operator = "==";
        dt.conditionCols.add( con3 );

        ConditionCol con4 = new ConditionCol();
        con4.boundName = "f2";
        con4.constraintValueType = BaseSingleFieldConstraint.TYPE_PREDICATE;
        con4.factType = "Driver";
        con4.header = "Driver 2 pimp";
        con4.factField = "(not needed)";
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtable.shared.model.legacy.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.