commons-issues mailing list archives

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


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:
>             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

View raw message