Module com.github.hazendaz.parent
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 ownPropertyEditor
on the propertyCsvDate
; used to set a custom date format (seeSimpleDateFormat
when converting to aDate
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:
- Column Index Mapping; used by default if no mapper is set, or explicitly if
CsvFile.mappingStrategy()
is set toColumnIndexMapper
. Properties are read in declaration order from their classes which translates directly to their column index. - Column Name Mapping; used if
CsvFile.mappingStrategy()
is set toColumnNameMapper
. By default the name of the property translates to the column header.
-
ClassDescriptionVarious 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.