Class RecordFieldSetMapper<T>

java.lang.Object
org.springframework.batch.item.file.mapping.RecordFieldSetMapper<T>
Type Parameters:
T - type of mapped items
All Implemented Interfaces:
FieldSetMapper<T>

public class RecordFieldSetMapper<T> extends Object implements FieldSetMapper<T>
This is a FieldSetMapper that supports Java records mapping (requires JKD 14 or higher). It uses the record's canonical constructor to map components with the same name as tokens in the FieldSet.
Since:
4.3
Author:
Mahmoud Ben Hassine
  • Constructor Details

    • RecordFieldSetMapper

      public RecordFieldSetMapper(Class<T> targetType)
      Create a new RecordFieldSetMapper.
      Parameters:
      targetType - type of mapped items
    • RecordFieldSetMapper

      public RecordFieldSetMapper(Class<T> targetType, org.springframework.core.convert.ConversionService conversionService)
      Create a new RecordFieldSetMapper.
      Parameters:
      targetType - type of mapped items
      conversionService - service to use to convert raw data to typed fields
  • Method Details