Bindy - Proposal: Evaluate DataField annotation properties trim, length, clip 
when marshalling BindyCsvDataFormat
-----------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-4337
                 URL: https://issues.apache.org/jira/browse/CAMEL-4337
             Project: Camel
          Issue Type: Task
          Components: camel-bindy
    Affects Versions: 2.7.1
            Reporter: Reinhard Luft
             Fix For: 2.9.0


When generating a csv file from a model object with a DataField annotated 
property the DataField properties trim, length, clip should be evaluated in 
order to control the maximum length of a field in the csv record.

Example:

@DataField(pos = 3, trim = true, length = 20, clip = true)
private String lastName;

This should produce a field in the csv record, which length is not greater than 
20 even though lastName may be longer and that has no leading or trailing 
spaces.

For example this would be useful when dumping the csv file into a database.

Please see the attached patch for changes in BindyCsvFactory and a unit test.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to