Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D75577CEF for ; Mon, 15 Aug 2011 13:41:49 +0000 (UTC) Received: (qmail 8156 invoked by uid 500); 15 Aug 2011 13:41:49 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 8039 invoked by uid 500); 15 Aug 2011 13:41:48 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 8031 invoked by uid 99); 15 Aug 2011 13:41:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2011 13:41:48 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2011 13:41:47 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1E82ABD070 for ; Mon, 15 Aug 2011 13:41:27 +0000 (UTC) Date: Mon, 15 Aug 2011 13:41:27 +0000 (UTC) From: "Reinhard Luft (JIRA)" To: dev@camel.apache.org Message-ID: <2065749895.38369.1313415687121.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <497096838.38359.1313415447077.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAMEL-4337) Bindy - Proposal: Evaluate DataField annotation properties trim, length, clip when marshalling BindyCsvDataFormat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-4337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reinhard Luft updated CAMEL-4337: --------------------------------- Attachment: trimandcliptrunk.patch > 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 > > Attachments: trimandcliptrunk.patch > > > 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