404-not-find / orika

Automatically exported from code.google.com/p/orika
2 stars 0 forks source link

Pass MappingContext to Converters #151

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
We need to access the MappingContext from within our custom converters. The 
Converter API (Converter.convert(S, Type)) should be extended to have a third 
parameter for the MappingContext:

D convert(S source, Type<? extends D> destinationType, MappingContext context);

I recognize that this is an API change that would force all existing custom 
converters to be extended with this additional parameter. Still I think that 
this is a necessary change in order to be able to pass the mapping context to 
subordinate mappers. After all, that's the reason why the converter API allows 
access to the MapperFacade, too. And the three Convert... specifications can 
easily be changed to generate code that passes the context to the converter.

Original issue reported on code.google.com by daniel.b...@googlemail.com on 25 Mar 2014 at 8:33

GoogleCodeExporter commented 8 years ago

Original comment by elaat...@gmail.com on 18 Oct 2014 at 3:46