camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-2289) camel-bindy - csv - Make it easier to marshal with POJO out of the box
Date Mon, 14 Dec 2009 16:34:52 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56434#action_56434
] 

Claus Ibsen commented on CAMEL-2289:
------------------------------------

Before
{code}
        PurchaseOrderBindy order = new PurchaseOrderBindy();
        order.setAmount(1);
        order.setPrice(new BigDecimal("39.95"));
        order.setName("Camel in Action");

        List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
        Map<String, Object> row = new HashMap<String, Object>();
        row.put(order.getClass().getName(), order);
        data.add(row);

        template.sendBody("direct:start", data);
{code}

After
{code}
        PurchaseOrder order = new PurchaseOrder();
        order.setAmount(1);
        order.setPrice(new BigDecimal("39.95"));
        order.setName("Camel in Action");

        template.sendBody("direct:start", order);
{code}

> camel-bindy - csv - Make it easier to marshal with POJO out of the box
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-2289
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2289
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.1.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Its to ugly that you must use List<Map<String, Object>> to wrap you POJO
to let Bindy be able to marhal my POJO to a CSV record.
> It should be able to detect that its not a List but a plain POJO and construct the List
itself and based on defaults.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message