CsvConverter provides a reasonable default
for CsvConverter#convertToWrite(java.lang.Object) as well as a couple
of common fields.
| Modifier and Type | Field and Description |
|---|---|
| protected Locale | errorLocale
The locale to be used for error messages. |
| protected Locale | locale
The locale to be used when converting for reading, if a locale is relevant. |
| protected Class | type
The type to which (on reading) or from which (on writing) conversion is being performed. |
| protected Locale | writeLocale
The locale to be used when converting for writing, if a locale is relevant. |
| Access | Constructor and Description |
|---|---|
| protected | AbstractCsvConverter()
Default nullary constructor, so derived classes aren't forced to create a constructor identical to this one. |
| protected | AbstractCsvConverter(Class<?>
The type to which (on reading) or from which (on writing) is
being converted type, String The locale to be used when converting for reading, if a
locale is relevant locale, String The locale to be used when converting for writing, if
a locale is relevant writeLocale, Locale The locale to be used for error messages errorLocale)Currently the only constructor for this class. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: A string representation of the value of the field in question in the bean passed in, or an empty string ifvalue is nullThe contents of the field currently being processed from the
bean to be written. Can be value)null if the field is not marked as
required.Implements com. This implementation simply calls |
| public void | setErrorLocale(Locale errorLocale)
Implements com. Sets the locale for all error messages. |
| public void | setLocale(String locale)
Implements com. If not null or empty, specifies the locale used for converting locale-specific data types for reading. |
| public void | setType(Class<?> type)
Implements com. Sets the class of the type of the data being processed. |
| public void | setWriteLocale(String writeLocale)
Implements com. If not null or empty, specifies the locale used for converting locale-specific data types for writing. |
| errorLocale | back to summary |
|---|---|
| protected Locale errorLocale The locale to be used for error messages. | |
| locale | back to summary |
|---|---|
| protected Locale locale The locale to be used when converting for reading, if a locale is relevant. | |
| type | back to summary |
|---|---|
| protected Class<?> type The type to which (on reading) or from which (on writing) conversion is being performed. | |
| writeLocale | back to summary |
|---|---|
| protected Locale writeLocale The locale to be used when converting for writing, if a locale is relevant. | |
| AbstractCsvConverter | back to summary |
|---|---|
| protected AbstractCsvConverter() Default nullary constructor, so derived classes aren't forced to create a constructor identical to this one.
| |
| AbstractCsvConverter | back to summary |
|---|---|
| protected AbstractCsvConverter(Class<?> type, String locale, String writeLocale, Locale errorLocale) Currently the only constructor for this class.
| |
| convertToWrite | back to summary |
|---|---|
| public String convertToWrite(Object value) throws CsvDataTypeMismatchException Implements com. This implementation simply calls
| |
| setErrorLocale | back to summary |
|---|---|
| public void setErrorLocale(Locale errorLocale) Implements com. Doc from com. Sets the locale for all error messages.
| |
| setLocale | back to summary |
|---|---|
| public void setLocale(String locale) Implements com. Doc from com. If not null or empty, specifies the locale used for converting locale-specific data types for reading.
| |
| setType | back to summary |
|---|---|
| public void setType(Class<?> type) Implements com. Doc from com. Sets the class of the type of the data being processed.
| |
| setWriteLocale | back to summary |
|---|---|
| public void setWriteLocale(String writeLocale) Implements com. Doc from com. If not null or empty, specifies the locale used for converting locale-specific data types for writing.
| |