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

Examples of org.drools.workbench.models.guided.dtable.shared.model.Pattern52


    public void testLimitedEntryActionSet() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.LIMITED_ENTRY );
        dt.setTableName( "limited-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_BOOLEAN );
        cc1.setFactField( "isSmurf" );
        cc1.setOperator( "==" );
        cc1.setValue( new DTCellValue52( "true" ) );
        p1.getChildColumns().add( cc1 );

        LimitedEntryActionSetFieldCol52 asf1 = new LimitedEntryActionSetFieldCol52();
        asf1.setBoundName( "p1" );
        asf1.setFactField( "colour" );
        asf1.setValue( new DTCellValue52( "Blue" ) );
View Full Code Here


    public void testLimitedEntryActionInsert() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.LIMITED_ENTRY );
        dt.setTableName( "limited-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        LimitedEntryActionInsertFactCol52 asf1 = new LimitedEntryActionInsertFactCol52();
        asf1.setFactType( "Smurf" );
        asf1.setBoundName( "s1" );
View Full Code Here

    public void testLHSIsNullOperator() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY );
        dt.setTableName( "extended-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        ConditionCol52 cc1 = new ConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "== null" );
        p1.getChildColumns().add( cc1 );

        ConditionCol52 cc2 = new ConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "== null" );
        p1.getChildColumns().add( cc2 );

        ConditionCol52 cc3 = new ConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "== null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", false, false, false }
        } ) );
View Full Code Here

    public void testLHSIsNullOperatorWithNullValues() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY );
        dt.setTableName( "extended-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        ConditionCol52 cc1 = new ConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "== null" );
        p1.getChildColumns().add( cc1 );

        ConditionCol52 cc2 = new ConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "== null" );
        p1.getChildColumns().add( cc2 );

        ConditionCol52 cc3 = new ConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "== null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", null, null, null }
        } ) );
View Full Code Here

    public void testLHSIsNotNullOperator() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY );
        dt.setTableName( "extended-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        ConditionCol52 cc1 = new ConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "!= null" );
        p1.getChildColumns().add( cc1 );

        ConditionCol52 cc2 = new ConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "!= null" );
        p1.getChildColumns().add( cc2 );

        ConditionCol52 cc3 = new ConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "!= null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", false, false, false }
        } ) );
View Full Code Here

    public void testLHSIsNotNullOperatorWithNullValues() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY );
        dt.setTableName( "extended-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        ConditionCol52 cc1 = new ConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "!= null" );
        p1.getChildColumns().add( cc1 );

        ConditionCol52 cc2 = new ConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "!= null" );
        p1.getChildColumns().add( cc2 );

        ConditionCol52 cc3 = new ConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "!= null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", null, null, null }
        } ) );
View Full Code Here

    public void testLimitedEntryLHSIsNullOperator() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.LIMITED_ENTRY );
        dt.setTableName( "limited-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "== null" );
        p1.getChildColumns().add( cc1 );

        LimitedEntryConditionCol52 cc2 = new LimitedEntryConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "== null" );
        p1.getChildColumns().add( cc2 );

        LimitedEntryConditionCol52 cc3 = new LimitedEntryConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "== null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", false, false, false }
        } ) );
View Full Code Here

    public void testLimitedEntryLHSIsNullOperatorWithNullValues() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.LIMITED_ENTRY );
        dt.setTableName( "limited-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "== null" );
        p1.getChildColumns().add( cc1 );

        LimitedEntryConditionCol52 cc2 = new LimitedEntryConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "== null" );
        p1.getChildColumns().add( cc2 );

        LimitedEntryConditionCol52 cc3 = new LimitedEntryConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "== null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", null, null, null }
        } ) );
View Full Code Here

    public void testLimitedEntryLHSIsNotNullOperator() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.LIMITED_ENTRY );
        dt.setTableName( "limited-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "!= null" );
        p1.getChildColumns().add( cc1 );

        LimitedEntryConditionCol52 cc2 = new LimitedEntryConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "!= null" );
        p1.getChildColumns().add( cc2 );

        LimitedEntryConditionCol52 cc3 = new LimitedEntryConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "!= null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", false, false, false }
        } ) );
View Full Code Here

    public void testLimitedEntryLHSIsNotNullOperatorWithNullValues() {
        GuidedDecisionTable52 dt = new GuidedDecisionTable52();
        dt.setTableFormat( GuidedDecisionTable52.TableFormat.LIMITED_ENTRY );
        dt.setTableName( "limited-entry" );

        Pattern52 p1 = new Pattern52();
        p1.setBoundName( "p1" );
        p1.setFactType( "Smurf" );
        dt.getConditions().add( p1 );

        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( DataType.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "!= null" );
        p1.getChildColumns().add( cc1 );

        LimitedEntryConditionCol52 cc2 = new LimitedEntryConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( DataType.TYPE_NUMERIC_INTEGER );
        cc2.setFactField( "age" );
        cc2.setOperator( "!= null" );
        p1.getChildColumns().add( cc2 );

        LimitedEntryConditionCol52 cc3 = new LimitedEntryConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( DataType.TYPE_DATE );
        cc3.setFactField( "dateOfBirth" );
        cc3.setOperator( "!= null" );
        p1.getChildColumns().add( cc3 );

        dt.setData( DataUtilities.makeDataLists( new Object[][]{
                new Object[]{ 1l, "desc", true, true, true },
                new Object[]{ 2l, "desc", null, null, null }
        } ) );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtable.shared.model.Pattern52

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.