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

Examples of org.drools.ide.common.client.modeldriven.dt52.DTCellValue52


        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "==" );
        cc1.setValue( new DTCellValue52( "Pupa" ) );
        p1.getChildColumns().add( cc1 );

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


        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        cc1.setFactField( "name" );
        cc1.setOperator( "==" );
        cc1.setValue( new DTCellValue52( "Pupa" ) );
        p1.getChildColumns().add( cc1 );

        LimitedEntryConditionCol52 cc2 = new LimitedEntryConditionCol52();
        cc2.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc2.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        cc2.setFactField( "name" );
        cc2.setOperator( "==" );
        cc2.setValue( new DTCellValue52( "Smurfette" ) );
        p1.getChildColumns().add( cc2 );

        LimitedEntryConditionCol52 cc3 = new LimitedEntryConditionCol52();
        cc3.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc3.setFieldType( SuggestionCompletionEngine.TYPE_STRING );
        cc3.setFactField( "colour" );
        cc3.setOperator( "==" );
        cc3.setValue( new DTCellValue52( "Blue" ) );
        p1.getChildColumns().add( cc3 );

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

        LimitedEntryConditionCol52 cc1 = new LimitedEntryConditionCol52();
        cc1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
        cc1.setFieldType( SuggestionCompletionEngine.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" ) );

        dt.getActionCols().add( asf1 );

        dt.setData( upgrader.makeDataLists( new Object[][]{
                                                           new Object[]{1l, "desc", true, true},
View Full Code Here

        LimitedEntryActionInsertFactCol52 asf1 = new LimitedEntryActionInsertFactCol52();
        asf1.setFactType( "Smurf" );
        asf1.setBoundName( "s1" );
        asf1.setFactField( "colour" );
        asf1.setValue( new DTCellValue52( "Blue" ) );

        dt.getActionCols().add( asf1 );

        dt.setData( upgrader.makeDataLists( new Object[][]{
                                                           new Object[]{1l, "desc", true},
View Full Code Here

        BigDecimal oldRowNum = new BigDecimal( 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 ActionRetractFactCol52 makeNewActionRetractFact() {
                switch ( guidedDecisionTable.getTableFormat() ) {
                    case LIMITED_ENTRY :
                        LimitedEntryActionRetractFactCol52 ler = new LimitedEntryActionRetractFactCol52();
                        ler.setValue( new DTCellValue52( "" ) );
                        return ler;
                    default :
                        return new ActionRetractFactCol52();
                }
            }
View Full Code Here

            }
            final SmallLabel label = makeColumnLabel( atc );
            hp.add( label );

            final TextBox defaultValue = new TextBox();
            final DTCellValue52 dcv = at.getDefaultValue();
            defaultValue.setStyleName( "form-field" );
            defaultValue.setText( (dcv == null ? "" : dcv.getStringValue()) );
            defaultValue.setEnabled( !isReadOnly );
            defaultValue.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent event) {
                    at.setDefaultValue( new DTCellValue52( defaultValue.getText() ) );
                }
            } );

            if ( at.getAttribute().equals( RuleAttributeWidget.SALIENCE_ATTR ) ) {
                hp.add( new HTML( "&nbsp;&nbsp;" ) );
View Full Code Here

            return false;
        }

        //Column values
        for ( int i = 0; i < expected.length; i++ ) {
            DTCellValue52 dcv = actual.get( i );
            switch ( dcv.getDataType() ) {
                case NUMERIC :
                    final BigDecimal numeric = (BigDecimal) dcv.getNumericValue();
                    if ( !expected[i].equals( numeric.toPlainString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_BIGDECIMAL :
                    final BigDecimal numericBigDecimal = (BigDecimal) dcv.getNumericValue();
                    if ( !expected[i].equals( numericBigDecimal.toPlainString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_BIGINTEGER :
                    final BigInteger numericBigInteger = (BigInteger) dcv.getNumericValue();
                    if ( !expected[i].equals( numericBigInteger.toString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_BYTE :
                    final Byte numericByte = (Byte) dcv.getNumericValue();
                    if ( !expected[i].equals( numericByte.toString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_DOUBLE :
                    final Double numericDouble = (Double) dcv.getNumericValue();
                    if ( !expected[i].equals( numericDouble.toString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_FLOAT :
                    final Float numericFloat = (Float) dcv.getNumericValue();
                    if ( !expected[i].equals( numericFloat.toString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_INTEGER :
                    final Integer numericInteger = (Integer) dcv.getNumericValue();
                    if ( !expected[i].equals( numericInteger.toString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_LONG :
                    final Long numericLong = (Long) dcv.getNumericValue();
                    if ( !expected[i].equals( numericLong.toString() ) ) {
                        return false;
                    }
                    break;
                case NUMERIC_SHORT :
                    final Short numericShort = (Short) dcv.getNumericValue();
                    if ( !expected[i].equals( numericShort.toString() ) ) {
                        return false;
                    }
                    break;
                case BOOLEAN :
                    if ( Boolean.parseBoolean( expected[i] ) != dcv.getBooleanValue() ) {
                        return false;
                    }
                    break;
                default :
                    if ( !expected[i].equals( dcv.getStringValue() ) ) {
                        return false;
                    }
            }
        }
        return true;
View Full Code Here

        dt.getActionCols().add(message);

        @SuppressWarnings("unchecked")
        List<List<DTCellValue52>> data = Arrays.asList(
                Arrays.asList(
                        new DTCellValue52(1),
                        new DTCellValue52("Row 1 description"),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52("Row 1 message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52("Row 2 message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52((Boolean) null),
                        new DTCellValue52("Row 3 message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52((Boolean) null),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52("Row 4 message")
                )
        );

        dt.setData( data );
       
View Full Code Here

        dt.getActionCols().add(message);

        @SuppressWarnings("unchecked")
        List<List<DTCellValue52>> data = Arrays.asList(
                Arrays.asList(
                        new DTCellValue52(1),
                        new DTCellValue52("Row 1 description"),
                        new DTCellValue52(new Integer("20")),
                        new DTCellValue52(new Integer("50")),
                        new DTCellValue52("Row 1 message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52(new Integer("40")),
                        new DTCellValue52(new Integer("30")),
                        new DTCellValue52("Row 2 message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52(new Integer("50")),
                        new DTCellValue52("Row 3 message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52(new Integer("20")),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52("Row 4 message")
                )
        );
       
        dt.setData(data);
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.dt52.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.