Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13926

Add annotation to Bindy dataformat for custom column name

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: camel-bindy
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      Add option to name a column to be used instead of property name as in the following example:

       
       

      @CsvRecord(separator = ",") public class Order { @DataField(pos = 1) private int orderNr; @Link private Client client; @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; @DataField(pos = 9, pattern = "dd-MM-yyyy") private Date orderDate; }

      It affects the @DataField annotation and only for marshalling to csv.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hakuseki Mikael Andersson Wigander
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: