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

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


        dt.getActionCols().add(message);

        @SuppressWarnings("unchecked")
        List<List<DTCellValue52>> data = Arrays.asList(
                Arrays.asList(
                        new DTCellValue52(1),
                        new DTCellValue52("Row 1 description"),
                        new DTCellValue52("Homer"),
                        new DTCellValue52("Bart"),
                        new DTCellValue52((String) null),
                        new DTCellValue52("Row 1 message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52("Homer"),
                        new DTCellValue52("Homer"),
                        new DTCellValue52((String) null),
                        new DTCellValue52("Row 2 message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52("Homer"),
                        new DTCellValue52((String) null),
                        new DTCellValue52((String) null),
                        new DTCellValue52("Row 3 message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52((String) null),
                        new DTCellValue52("Bart"),
                        new DTCellValue52((String) null),
                        new DTCellValue52("Row 4 message")
                ),
                Arrays.asList(
                        new DTCellValue52(5),
                        new DTCellValue52("Row 5 description"),
                        new DTCellValue52("Homer"),
                        new DTCellValue52((String) null),
                        new DTCellValue52("Marge,Lisa"),
                        new DTCellValue52("Row 5 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(dateFormat.parse("1981-01-01")),
                        new DTCellValue52(dateFormat.parse("2001-01-01")),
                        new DTCellValue52("Row 1 message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52(dateFormat.parse("2001-01-01")),
                        new DTCellValue52(dateFormat.parse("1981-01-01")),
                        new DTCellValue52("Row 2 message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52((Date) null),
                        new DTCellValue52(dateFormat.parse("2001-01-01")),
                        new DTCellValue52("Row 3 message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52(dateFormat.parse("1981-01-01")),
                        new DTCellValue52((Date) null),
                        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("Homer"),
                        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("Homer"),
                        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((String) null),
                        new DTCellValue52(new Integer("40")),
                        new DTCellValue52(new Integer("30")),
                        new DTCellValue52("Row 3 message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52("Homer"),
                        new DTCellValue52(new Integer("20")),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52("Row 4 message")
                ),
                Arrays.asList(
                        new DTCellValue52(5),
                        new DTCellValue52("Row 5 description"),
                        new DTCellValue52((String) null),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52("Row 5 message")
                )
        );

        dt.setData(data);
View Full Code Here

        driverPattern.setFactType("Driver");

        LimitedEntryConditionCol52 child = new LimitedEntryConditionCol52();
        child.setFactField("age");
        child.setOperator("<");
        child.setValue(new DTCellValue52(new Integer("18")));
        child.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        driverPattern.getChildColumns().add(child);

        LimitedEntryConditionCol52 pensioner = new LimitedEntryConditionCol52();
        pensioner.setFactField("age");
        pensioner.setOperator(">=");
        pensioner.setValue(new DTCellValue52(new Integer("65")));
        pensioner.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        driverPattern.getChildColumns().add(pensioner);

        dt.getConditions().add(driverPattern);

        ActionSetFieldCol52 message = new ActionSetFieldCol52();
        message.setBoundName("m");
        message.setFactField("message");
        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.FALSE),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52("Row 3 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((Integer) null),
                        new DTCellValue52(new Integer("20")),
                        new DTCellValue52("Row 1 message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52(new Integer("21")),
                        new DTCellValue52(new Integer("40")),
                        new DTCellValue52("Row 2 message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52(new Integer("30")),
                        new DTCellValue52(new Integer("60")),
                        new DTCellValue52("Row 3 message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52(new Integer("50")),
                        new DTCellValue52((Integer) null),
                        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((Integer) null),
                        new DTCellValue52(new Integer("20")),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52("Row 1 message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52(new Integer("21")),
                        new DTCellValue52(new Integer("40")),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52("Row 2 message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52(new Integer("41")),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52("Row 3 message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52(new Integer("25")),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52("Row 4 message")
                ),
                Arrays.asList(
                        new DTCellValue52(5),
                        new DTCellValue52("Row 5 description"),
                        new DTCellValue52(new Integer("26")),
                        new DTCellValue52(new Integer("60")),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52("Row 5 message")
                ),
                Arrays.asList(
                        new DTCellValue52(6),
                        new DTCellValue52("Row 6 description"),
                        new DTCellValue52(new Integer("50")),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52("Row 6 message")
                )
        );

        dt.setData(data);
View Full Code Here

        driverPattern.setFactType("Driver");

        LimitedEntryConditionCol52 child = new LimitedEntryConditionCol52();
        child.setFactField("age");
        child.setOperator("<");
        child.setValue(new DTCellValue52(new Integer("18")));
        child.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        driverPattern.getChildColumns().add(child);

        LimitedEntryConditionCol52 adult = new LimitedEntryConditionCol52();
        adult.setFactField("age");
        adult.setOperator(">=");
        adult.setValue(new DTCellValue52(new Integer("18")));
        adult.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        driverPattern.getChildColumns().add(adult);

        LimitedEntryConditionCol52 pensioner = new LimitedEntryConditionCol52();
        pensioner.setFactField("age");
        pensioner.setOperator(">=");
        pensioner.setValue(new DTCellValue52(new Integer("65")));
        pensioner.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
        driverPattern.getChildColumns().add(pensioner);

        dt.getConditions().add(driverPattern);

        ActionSetFieldCol52 message = new ActionSetFieldCol52();
        message.setBoundName("m");
        message.setFactField("message");
        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(Boolean.FALSE),
                        new DTCellValue52("Row 1 message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52("Row 2 message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52(Boolean.FALSE),
                        new DTCellValue52(Boolean.TRUE),
                        new DTCellValue52("Row 3 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((Integer) null),
                        new DTCellValue52(new Integer("20")),
                        new DTCellValue52("Same message")
                ),
                Arrays.asList(
                        new DTCellValue52(2),
                        new DTCellValue52("Row 2 description"),
                        new DTCellValue52(new Integer("21")),
                        new DTCellValue52(new Integer("40")),
                        new DTCellValue52("Same message")
                ),
                Arrays.asList(
                        new DTCellValue52(3),
                        new DTCellValue52("Row 3 description"),
                        new DTCellValue52(new Integer("30")),
                        new DTCellValue52(new Integer("60")),
                        new DTCellValue52("Same message")
                ),
                Arrays.asList(
                        new DTCellValue52(4),
                        new DTCellValue52("Row 4 description"),
                        new DTCellValue52(new Integer("50")),
                        new DTCellValue52((Integer) null),
                        new DTCellValue52("Same message")
                )
        );

        dt.setData(data);
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(),
                      DTDataTypes52.BOOLEAN );
        assertEquals( dcv2.getDataType(),
                      DTDataTypes52.DATE );
        assertEquals( dcv3.getDataType(),
                      DTDataTypes52.NUMERIC_BIGDECIMAL );
        assertEquals( dcv4.getDataType(),
                      DTDataTypes52.NUMERIC_BIGINTEGER );
        assertEquals( dcv5.getDataType(),
                      DTDataTypes52.NUMERIC_BYTE );
        assertEquals( dcv6.getDataType(),
                      DTDataTypes52.NUMERIC_DOUBLE );
        assertEquals( dcv7.getDataType(),
                      DTDataTypes52.NUMERIC_FLOAT );
        assertEquals( dcv8.getDataType(),
                      DTDataTypes52.NUMERIC_INTEGER );
        assertEquals( dcv9.getDataType(),
                      DTDataTypes52.NUMERIC_LONG );
        assertEquals( dcv10.getDataType(),
                      DTDataTypes52.NUMERIC_SHORT );
        assertEquals( dcv11.getDataType(),
                      DTDataTypes52.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

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.