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

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


        ConditionCol52 c1 = new ConditionCol52();
        c1.setFactField( "name" );
        c1.setOperator( "==" );
        c1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        c1.setValueList( "c1a,c1b" );
        c1.setDefaultValue( new DTCellValue52( "c1default" ) );
        p1.getChildColumns().add( c1 );
        model.getConditions().add( p1 );

        Pattern52 p2 = new Pattern52();
        p2.setBoundName( "c2" );
        p2.setFactType( "Driver" );

        ConditionCol52 c2 = new ConditionCol52();
        c2.setFactField( "age" );
        c2.setOperator( "==" );
        c2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        c2.setValueList( "c2a,c2b" );
        c2.setDefaultValue( new DTCellValue52( "c2default" ) );
        p2.getChildColumns().add( c2 );
        model.getConditions().add( p2 );

        Pattern52 p3 = new Pattern52();
        p3.setBoundName( "c3" );
        p3.setFactType( "Driver" );

        ConditionCol52 c3 = new ConditionCol52();
        c3.setFactField( "dateOfBirth" );
        c3.setOperator( "==" );
        c3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        c3.setDefaultValue( new DTCellValue52( "c3default" ) );
        p3.getChildColumns().add( c3 );
        model.getConditions().add( p3 );

        RowExpander re = new RowExpander( model,
                                          oracle );
View Full Code Here


        ConditionCol52 c2 = new ConditionCol52();
        c2.setFactField( "age" );
        c2.setOperator( "==" );
        c2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        c2.setValueList( "c2a,c2b" );
        c2.setDefaultValue( new DTCellValue52( "c2default" ) );
        p2.getChildColumns().add( c2 );
        model.getConditions().add( p2 );

        Pattern52 p3 = new Pattern52();
        p3.setBoundName( "c3" );
View Full Code Here

        LimitedEntryConditionCol52 c1 = new LimitedEntryConditionCol52();
        c1.setFactField( "name" );
        c1.setOperator( "==" );
        c1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        c1.setValue( new DTCellValue52( "Mike" ) );
        p1.getChildColumns().add( c1 );
        model.getConditions().add( p1 );

        Pattern52 p2 = new Pattern52();
        p2.setBoundName( "c2" );
        p2.setFactType( "Driver" );

        LimitedEntryConditionCol52 c2 = new LimitedEntryConditionCol52();
        c2.setFactField( "age" );
        c2.setOperator( "==" );
        c2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        c1.setValue( new DTCellValue52( 25 ) );
        p2.getChildColumns().add( c2 );
        model.getConditions().add( p2 );

        LimitedEntryActionSetFieldCol52 a1 = new LimitedEntryActionSetFieldCol52();
        a1.setBoundName( "c1" );
        a1.setFactField( "name" );
        a1.setValue( new DTCellValue52( "a1name" ) );
        model.getActionCols().add( a1 );

        LimitedEntryActionInsertFactCol52 a2 = new LimitedEntryActionInsertFactCol52();
        a2.setBoundName( "a2" );
        a2.setFactType( "Driver" );
        a2.setFactField( "name" );
        a2.setValue( new DTCellValue52( "a2name" ) );
        model.getActionCols().add( a2 );

        RowExpander re = new RowExpander( model,
                                          oracle );
View Full Code Here

        cdob.set( 2000,
                  0,
                  1 );
        Date dob = cdob.getTime();

        DTCellValue52 dcv1 = new DTCellValue52( Boolean.TRUE );
        DTCellValue52 dcv2 = new DTCellValue52( dob );
        DTCellValue52 dcv3 = new DTCellValue52( new BigDecimal( 1 ) );
        DTCellValue52 dcv4 = new DTCellValue52( new BigInteger( "1" ) );
        DTCellValue52 dcv5 = new DTCellValue52( new Byte( "1" ) );
        DTCellValue52 dcv6 = new DTCellValue52( 1.0d );
        DTCellValue52 dcv7 = new DTCellValue52( 1.0f );
        DTCellValue52 dcv8 = new DTCellValue52( new Integer( 1 ) );
        DTCellValue52 dcv9 = new DTCellValue52( 1l );
        DTCellValue52 dcv10 = new DTCellValue52( new Short( "1" ) );
        DTCellValue52 dcv11 = new DTCellValue52( "Smurf" );

        assertEquals( dcv1.getDataType(),
                      DataType.DataTypes.BOOLEAN );
        assertEquals( dcv2.getDataType(),
                      DataType.DataTypes.DATE );
        assertEquals( dcv3.getDataType(),
                      DataType.DataTypes.NUMERIC_BIGDECIMAL );
        assertEquals( dcv4.getDataType(),
                      DataType.DataTypes.NUMERIC_BIGINTEGER );
        assertEquals( dcv5.getDataType(),
                      DataType.DataTypes.NUMERIC_BYTE );
        assertEquals( dcv6.getDataType(),
                      DataType.DataTypes.NUMERIC_DOUBLE );
        assertEquals( dcv7.getDataType(),
                      DataType.DataTypes.NUMERIC_FLOAT );
        assertEquals( dcv8.getDataType(),
                      DataType.DataTypes.NUMERIC_INTEGER );
        assertEquals( dcv9.getDataType(),
                      DataType.DataTypes.NUMERIC_LONG );
        assertEquals( dcv10.getDataType(),
                      DataType.DataTypes.NUMERIC_SHORT );
        assertEquals( dcv11.getDataType(),
                      DataType.DataTypes.STRING );
    }
View Full Code Here

    @Test
    public void testEmptyCells() {

        CellValue<? extends Comparable<?>> cell1 = factory.convertModelCellValue( at1,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell2 = factory.convertModelCellValue( at2,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell3 = factory.convertModelCellValue( c1,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell4 = factory.convertModelCellValue( c2,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell5 = factory.convertModelCellValue( c3,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell6 = factory.convertModelCellValue( c4,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell7 = factory.convertModelCellValue( c5,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell8 = factory.convertModelCellValue( c6,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell9 = factory.convertModelCellValue( c7,
                                                                                  new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell10 = factory.convertModelCellValue( c8,
                                                                                   new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell11 = factory.convertModelCellValue( c9,
                                                                                   new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell12 = factory.convertModelCellValue( c10,
                                                                                   new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell13 = factory.convertModelCellValue( c11,
                                                                                   new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell14 = factory.convertModelCellValue( a1,
                                                                                   new DTCellValue52() );
        CellValue<? extends Comparable<?>> cell15 = factory.convertModelCellValue( a2,
                                                                                   new DTCellValue52() );

        assertEquals( cell1.getValue(),
                      null );
        assertEquals( cell2.getValue(),
                      Boolean.FALSE );
View Full Code Here

        cdob.set( 2000,
                  0,
                  1 );
        Date dob = cdob.getTime();

        DTCellValue52 dcv1 = new DTCellValue52( new Integer( 1 ) );
        DTCellValue52 dcv2 = new DTCellValue52( Boolean.TRUE );
        DTCellValue52 dcv3 = new DTCellValue52( "Michael" );
        DTCellValue52 dcv4 = new DTCellValue52( new BigDecimal( 11 ) );
        DTCellValue52 dcv5 = new DTCellValue52( new BigInteger( "11" ) );
        DTCellValue52 dcv6 = new DTCellValue52( new Byte( "11" ) );
        DTCellValue52 dcv7 = new DTCellValue52( 11.0d );
        DTCellValue52 dcv8 = new DTCellValue52( 11.0f );
        DTCellValue52 dcv9 = new DTCellValue52( new Integer( 11 ) );
        DTCellValue52 dcv10 = new DTCellValue52( 11l );
        DTCellValue52 dcv11 = new DTCellValue52( new Short( "11" ) );
        DTCellValue52 dcv12 = new DTCellValue52( dob );
        DTCellValue52 dcv13 = new DTCellValue52( Boolean.TRUE );
        DTCellValue52 dcv14 = new DTCellValue52( "Mike" );
        DTCellValue52 dcv15 = new DTCellValue52( "Mike" );

        CellValue<? extends Comparable<?>> cell1 = factory.convertModelCellValue( at1,
                                                                                  dcv1 );
        CellValue<? extends Comparable<?>> cell2 = factory.convertModelCellValue( at2,
                                                                                  dcv2 );
View Full Code Here

        cdob.set( 2000,
                  0,
                  1 );
        Date dob = cdob.getTime();

        DTCellValue52 dcv1 = new DTCellValue52( "1" );
        DTCellValue52 dcv2 = new DTCellValue52( "true" );
        DTCellValue52 dcv3 = new DTCellValue52( "Michael" );
        DTCellValue52 dcv4 = new DTCellValue52( "11" );
        DTCellValue52 dcv5 = new DTCellValue52( "11" );
        DTCellValue52 dcv6 = new DTCellValue52( "11" );
        DTCellValue52 dcv7 = new DTCellValue52( "11" );
        DTCellValue52 dcv8 = new DTCellValue52( "11" );
        DTCellValue52 dcv9 = new DTCellValue52( "11" );
        DTCellValue52 dcv10 = new DTCellValue52( "11" );
        DTCellValue52 dcv11 = new DTCellValue52( "11" );
        DTCellValue52 dcv12 = new DTCellValue52( "01-JAN-2000" );
        DTCellValue52 dcv13 = new DTCellValue52( "true" );
        DTCellValue52 dcv14 = new DTCellValue52( "Mike" );
        DTCellValue52 dcv15 = new DTCellValue52( "Mike" );

        CellValue<? extends Comparable<?>> cell1 = factory.convertModelCellValue( at1,
                                                                                  dcv1 );
        CellValue<? extends Comparable<?>> cell2 = factory.convertModelCellValue( at2,
                                                                                  dcv2 );
View Full Code Here

    }

    @Test
    public void testConversionEmptyValues() {

        DTCellValue52 dcv1 = new DTCellValue52( "" );
        DTCellValue52 dcv2 = new DTCellValue52( "" );
        DTCellValue52 dcv3 = new DTCellValue52( "" );
        DTCellValue52 dcv4 = new DTCellValue52( "" );
        DTCellValue52 dcv5 = new DTCellValue52( "" );
        DTCellValue52 dcv6 = new DTCellValue52( "" );
        DTCellValue52 dcv7 = new DTCellValue52( "" );
        DTCellValue52 dcv8 = new DTCellValue52( "" );
        DTCellValue52 dcv9 = new DTCellValue52( "" );
        DTCellValue52 dcv10 = new DTCellValue52( "" );
        DTCellValue52 dcv11 = new DTCellValue52( "" );
        DTCellValue52 dcv12 = new DTCellValue52( "" );
        DTCellValue52 dcv13 = new DTCellValue52( "" );
        DTCellValue52 dcv14 = new DTCellValue52( "" );
        DTCellValue52 dcv15 = new DTCellValue52( "" );

        CellValue<? extends Comparable<?>> cell1 = factory.convertModelCellValue( at1,
                                                                                  dcv1 );
        CellValue<? extends Comparable<?>> cell2 = factory.convertModelCellValue( at2,
                                                                                  dcv2 );
        CellValue<? extends Comparable<?>> cell3 = factory.convertModelCellValue( c1,
                                                                                  dcv3 );
        CellValue<? extends Comparable<?>> cell4 = factory.convertModelCellValue( c2,
                                                                                  dcv4 );
        CellValue<? extends Comparable<?>> cell5 = factory.convertModelCellValue( c3,
                                                                                  dcv5 );
        CellValue<? extends Comparable<?>> cell6 = factory.convertModelCellValue( c4,
                                                                                  dcv6 );
        CellValue<? extends Comparable<?>> cell7 = factory.convertModelCellValue( c5,
                                                                                  dcv7 );
        CellValue<? extends Comparable<?>> cell8 = factory.convertModelCellValue( c6,
                                                                                  dcv8 );
        CellValue<? extends Comparable<?>> cell9 = factory.convertModelCellValue( c7,
                                                                                  dcv9 );
        CellValue<? extends Comparable<?>> cell10 = factory.convertModelCellValue( c8,
                                                                                   dcv10 );
        CellValue<? extends Comparable<?>> cell11 = factory.convertModelCellValue( c9,
                                                                                   dcv11 );
        CellValue<? extends Comparable<?>> cell12 = factory.convertModelCellValue( c10,
                                                                                   dcv12 );
        CellValue<? extends Comparable<?>> cell13 = factory.convertModelCellValue( c11,
                                                                                   dcv13 );
        CellValue<? extends Comparable<?>> cell14 = factory.convertModelCellValue( a1,
                                                                                   dcv14 );
        CellValue<? extends Comparable<?>> cell15 = factory.convertModelCellValue( a2,
                                                                                   dcv15 );

        assertEquals( cell1.getValue(),
                      null );
        assertEquals( cell2.getValue(),
                      Boolean.FALSE );
        assertEquals( cell3.getValue(),
                      null );
        assertEquals( cell4.getValue(),
                      null );
        assertEquals( cell5.getValue(),
                      null );
        assertEquals( cell6.getValue(),
                      null );
        assertEquals( cell7.getValue(),
                      null );
        assertEquals( cell8.getValue(),
                      null );
        assertEquals( cell9.getValue(),
                      null );
        assertEquals( cell10.getValue(),
                      null );
        assertEquals( cell11.getValue(),
                      null );
        assertEquals( cell12.getValue(),
                      null );
        assertEquals( cell13.getValue(),
                      Boolean.FALSE );
        assertEquals( cell14.getValue(),
                      null );
        assertEquals( cell15.getValue(),
                      null );

        assertEquals( dcv1.getDataType(),
                      DataType.DataTypes.NUMERIC_INTEGER );
        assertEquals( dcv2.getDataType(),
                      DataType.DataTypes.BOOLEAN );
        assertEquals( dcv3.getDataType(),
                      DataType.DataTypes.STRING );
        assertEquals( dcv4.getDataType(),
                      DataType.DataTypes.NUMERIC_BIGDECIMAL );
        assertEquals( dcv5.getDataType(),
                      DataType.DataTypes.NUMERIC_BIGINTEGER );
        assertEquals( dcv6.getDataType(),
                      DataType.DataTypes.NUMERIC_BYTE );
        assertEquals( dcv7.getDataType(),
                      DataType.DataTypes.NUMERIC_DOUBLE );
        assertEquals( dcv8.getDataType(),
                      DataType.DataTypes.NUMERIC_FLOAT );
        assertEquals( dcv9.getDataType(),
                      DataType.DataTypes.NUMERIC_INTEGER );
        assertEquals( dcv10.getDataType(),
                      DataType.DataTypes.NUMERIC_LONG );
        assertEquals( dcv11.getDataType(),
                      DataType.DataTypes.NUMERIC_SHORT );
        assertEquals( dcv12.getDataType(),
                      DataType.DataTypes.DATE );
        assertEquals( dcv13.getDataType(),
                      DataType.DataTypes.BOOLEAN );
        assertEquals( dcv14.getDataType(),
                      DataType.DataTypes.STRING );
        assertEquals( dcv15.getDataType(),
                      DataType.DataTypes.STRING );
    }
View Full Code Here

        int oldRowNum = Integer.valueOf( array[ 0 ] );
        assertEquals( newRowNum,
                      oldRowNum );

        for ( int iCol = 1; iCol < row.size(); iCol++ ) {
            DTCellValue52 cell = row.get( iCol );
            String v1 = cell.getStringValue();
            String v2 = array[ iCol ];
            assertTrue( isEqualOrNull( v1,
                                       v2 ) );
            assertEquals( v1,
                          v2 );
View Full Code Here

    }

    private AttributeCol52 makeNewColumn( AttributeCol c ) {
        AttributeCol52 nc = new AttributeCol52();
        nc.setAttribute( c.attr );
        nc.setDefaultValue( new DTCellValue52( c.defaultValue ) );
        nc.setHideColumn( c.hideColumn );
        nc.setReverseOrder( c.reverseOrder );
        nc.setUseRowNumber( c.useRowNumber );
        nc.setWidth( c.width );
        return nc;
View Full Code Here

TOP

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

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.