You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/10/02 12:01:06 UTC

[camel] branch master updated: Missing `columnName` description (#3215)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 6ff9997  Missing `columnName` description (#3215)
6ff9997 is described below

commit 6ff99977d805d78c8325a203985a6518e34faf6e
Author: Mikael Andersson Wigander <mi...@gmail.com>
AuthorDate: Wed Oct 2 14:00:55 2019 +0200

    Missing `columnName` description (#3215)
    
    I have provided the documentation with a short description of the `columnName` annotation.
    I hope it is accurate enough!
    
    M
---
 .../src/main/docs/bindy-dataformat.adoc            | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/components/camel-bindy/src/main/docs/bindy-dataformat.adoc b/components/camel-bindy/src/main/docs/bindy-dataformat.adoc
index 7db66ad..c4fbef6 100644
--- a/components/camel-bindy/src/main/docs/bindy-dataformat.adoc
+++ b/components/camel-bindy/src/main/docs/bindy-dataformat.adoc
@@ -481,6 +481,9 @@ generated (output message) must be different compare to input position
 |defaultValue |string |optional - default value = "" - defines the field's
 default value when the respective CSV field is empty/not available
 
+|columnName |string |optional - default value = "" - defines the field's
+header name; uses the name of the property as default. Only applicable when `CsvRecord` has `generateHeaderColumns = true`
+
 |impliedDecimalSeparator |boolean |optional - default value = "false" - Indicates if there is
 a decimal point implied at a specified location
 
@@ -728,6 +731,27 @@ public class Order {
 }
 ----
 
+*case 8 : columnName*
+
+Specifies the column name for the property only if `CsvRecord` has annotation `generateHeaderColumns = true`
+
+*Column Name*
+[source,java]
+----
+@CsvRecord(separator = ",", generateHeaderColumns = true)
+public class Order {
+
+    @DataField(pos = 1)
+    private int orderNr;
+
+    @DataField(pos = 5, columnName = "ISIN")
+    private String isinCode;
+
+    @DataField(name = "Name", pos = 6)
+    private String instrumentName;
+}
+----
+
 This attribute is only applicable to optional fields.
 
 == 4. FixedLengthRecord