Package org.csveed.annotations


package org.csveed.annotations

Contains various annotation that can be applied to Java beans and contain instructions for reading CSV files and converting CSV Rows to beans.

The following annotations can be found here:

  • CsvFile; generic instructions such as the symbols to use for parsing and whether to skip comment and empty lines. Used to set the start line from which to start the parsing process and whether to use headers or not. Also instructs on the usage of the mapping strategy from Row to bean.
  • CsvCell; used to determine the mapping from either the column index or the column name to the property. Also used to set whether the value is required.
  • CsvConverter; used to set your own PropertyEditor on the property
  • CsvDate; used to set a custom date format (see SimpleDateFormat when converting to a Date
  • CsvIgnore; states that a property must be ignored for mapping

Note that a default mapping interpretation is in place to make sure that an absolute minimum configuration is required:

  • Annotation Types
    Class
    Description
    Various settings for a BeanInstructionsImpl translating to a CSV cell.
    Sets a custom converter for the field.
    Date is a special case, since it will require a format to be supplied.
    Various settings applying to the entire CSV file and BeanInstructions.
    Determines whether the field will receive the header name of the current dynamic column.
    Determines whether the field will receive the cell value of the current dynamic column.
    When this annotation is set on a field, it will be skipped during deserialization even if a matching column name is found.
    Makes sure that a specific Locale is used to convert numbers.