package @CONVERTER_PCK@;

import org.modelmapper.Converter;
import org.modelmapper.ModelMapper;
import org.modelmapper.spi.MappingContext;
import org.springframework.beans.factory.annotation.Autowired;

public class BeanConverter<S, D> implements Converter<S, D> {

	@Autowired
	ModelMapper modelMapper;
	
	@Override
	public D convert(MappingContext<S, D> context) {
		return modelMapper.map(context.getSource(), context.getDestinationType());
	}
}
