Class AbstractExportRowConverter<S>

  • All Implemented Interfaces:
    org.springframework.core.convert.converter.Converter<S,​Map<String,​String>>

    public abstract class AbstractExportRowConverter<S>
    extends Object
    implements org.springframework.core.convert.converter.Converter<S,​Map<String,​String>>
    The base class that is used to convert from given value to a Map row representation. It uses ExportSpecification to convert only certain fields.

    Example usage:

      public class EntityExportRowConverter extends AbstractExportRowConverter {
         public EntityExportRowConverter(ExportSpecification specification, ObjectMapper baseMapper) {
             super(specification, baseMapper);
         }
    
        @Override
         public Map convert(Entity source) {
             return getMapper().convertValue(source, new TypeReference>() {});
         }
      }
    
     
    Author:
    Dima Myroniuk (dmyroniuk)