Class AbstractExportRowConverter<S>

java.lang.Object
com.broadleafcommerce.common.dataexport.service.specification.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<String, String> convert(Entity source) {
         return getMapper().convertValue(source, new TypeReference<Map<String, String>>() {});
     }
  }

 
Author:
Dima Myroniuk (dmyroniuk)