Sure, this is from camel web

@CsvRecord(separator = ",")
public class Order {

    @DataField(pos = 1)
    private int orderNr;

    @DataField(pos = 5)
    private String isinCode;

    @DataField(name = "Name", pos = 6)
    private String instrumentName;

    @DataField(pos = 7, precision = 2)
    private BigDecimal amount;

    @DataField(pos = 8)
    private String currency;

    // pattern used during parsing or when the date is created
    @DataField(pos = 9, pattern = "dd-MM-yyyy")
    private Date orderDate;
}




> On 30 Aug 2019, at 13:45, Claus Ibsen <claus.ib...@gmail.com> wrote:
> 
> Hi
> 
> Can you maybe provide a small example or sample code what you are looking for?
> 
> On Wed, Aug 28, 2019 at 7:50 AM Mikael Andersson Wigander
> <mikael.grevs...@gmail.com> wrote:
>> 
>> Used for creating CSV files with a hierarchy of objects using @Link 
>> annotation
>> 
>> I find it odd NOT having the option to name the column using annotation 
>> since you have control over other attributes…
>> 
>> M
>> 
>>> On 27 Aug 2019, at 18:52, George Daswani <georgedasw...@hotmail.com> wrote:
>>> 
>>> Are you using it to parse CSV files?  or produce CSV files?
>>> 
>>> I suggest you use Camel-CSV instead.   BIndy CSV has a couple of problems 
>>> with the first being it doesn't properly support RFC-4180 CSV files, and 
>>> the second being it uses reflection to set properties..
>>> 
>>> On Tue, Aug 27, 2019 at 12:17 AM Mikael Andersson Wigander 
>>> <mikael.grevs...@gmail.com<mailto:mikael.grevs...@gmail.com>> wrote:
>>> Good morning.
>>> 
>>> Using Bindy dataformat, in the documentation nothing states how to set 
>>> column name but some example has the name attribute given as if possible to 
>>> set the name of the column header to anything other than the field name. 
>>> This appartently doesn’t work so question is, is it possible?
>>> 
>>> when marshalling to csv file
>>> 
>>> Thx
>>> 
>>> M
>> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to