CsvExportCustomizer

public interface CsvExportCustomizer

The CsvExportCustomizer interface allows to provide custom method to format related instances during csv import.

Methods

columnOrderComparator

Comparator<Field> columnOrderComparator()

Allows the customizer to change the ordering of columns in the exporter file. The comparator returned by this method will be used for ordering fields. Note that the comparator might be requested to order fields that were not selected for export - it will be used to order the entire collection of fields from the entity.

Returns:the comparator that will be used for determining the column order

exportDisplayName

String exportDisplayName(Field field)

Retrieves the display name for the given entity field, that will be shown in the top row while exporting instances to CSV/PDF file. By default, the display name of the field is used.

Parameters:
  • field – entity field to retrieve display name for
Returns:

display name of the given field in the exported files

formatField

String formatField(FieldDto field, Object object)

Formats the field value for CSV display.

Parameters:
  • object – the object to format
  • field – the field to format
Returns:

the formatted string that will represent the value in CSV data