T - type of mapped itemspublic class RecordFieldSetMapper<T> extends java.lang.Object implements FieldSetMapper<T>
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.| Constructor and Description |
|---|
RecordFieldSetMapper(java.lang.Class<T> targetType)
Create a new
RecordFieldSetMapper. |
RecordFieldSetMapper(java.lang.Class<T> targetType,
org.springframework.core.convert.ConversionService conversionService)
Create a new
RecordFieldSetMapper. |
| Modifier and Type | Method and Description |
|---|---|
T |
mapFieldSet(FieldSet fieldSet)
Method used to map data obtained from a
FieldSet into an object. |
public RecordFieldSetMapper(java.lang.Class<T> targetType)
RecordFieldSetMapper.targetType - type of mapped itemspublic RecordFieldSetMapper(java.lang.Class<T> targetType, org.springframework.core.convert.ConversionService conversionService)
RecordFieldSetMapper.targetType - type of mapped itemsconversionService - service to use to convert raw data to typed fieldspublic T mapFieldSet(FieldSet fieldSet)
FieldSetMapperFieldSet into an object.mapFieldSet in interface FieldSetMapper<T>fieldSet - the FieldSet to map