commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Grégoire (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CSV-66) Bean mapping
Date Mon, 02 Jan 2017 17:59:58 GMT

    [ https://issues.apache.org/jira/browse/CSV-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15793251#comment-15793251
] 

Olivier Grégoire commented on CSV-66:
-------------------------------------

Now that 1.0 is out (as well as 1.4), is it possible to put this issue in the queue?

>From my own needs, I put down the following list of possible requirements.

The converter should automatically convert to/from primitive types (hexadecimal should be
supported where appropriate), enums, {{java.math.BigInteger}}, {{java.math.BigDecimal}}, {{java.util.Date}},
{{java.util.Calendar}}, {{java.time.*}}, etc. In addition, custom field mapping should be
possible over the standard mapping. It should be possible to apply a custom mapping to one
field only and not for all fields of a specific type.

I see the following content in the annotation(s):
- header name : this class-field correspond to that csv-named-field
- column order : this class-field correspond to that csv-numbered-field
- width and alignment : for all fields
- trim and truncate : for {{String}}
- format : for {{Date}}, including {{java.time}} (using {{SimpleDateFormat}}'s format); numbers,
especially floating (using {{Formatter}}'s format?)
- locale : to allow parsing/writing using locale-specific formats
- mapper : to provide a custom field mapper

> Bean mapping
> ------------
>
>                 Key: CSV-66
>                 URL: https://issues.apache.org/jira/browse/CSV-66
>             Project: Commons CSV
>          Issue Type: New Feature
>          Components: Parser, Printer
>            Reporter: Emmanuel Bourg
>             Fix For: Patch Needed, 1.x
>
>
> Commons CSV needs a way to easily read/write a collection of beans from/to a CSV file.
Annotations could be used to map precisely the object fields to the CSV columns.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message