camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-5031) Dozer Type Conversion Does Not Work With Context Based Mappings (map-id)
Date Sat, 11 Jul 2015 14:57:04 GMT


Claus Ibsen resolved CAMEL-5031.
    Resolution: Unresolved

> Dozer Type Conversion Does Not Work With Context Based Mappings (map-id)
> ------------------------------------------------------------------------
>                 Key: CAMEL-5031
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: bean-integration, camel-core
>    Affects Versions: 2.6.0, 2.9.0
>            Reporter: Andre Piwoni
>            Priority: Minor
> DozerTypeConverter utilizes DozerBeanMappper's method map(Object source, Class<T>
destinationClass) to convert objects. Unfortunately, this does not work for Dozer's context
based mapping with map-id because it requires call to source,
Class<T> destinationClass, String mapId).
> Example below does not work without map-id, which is actually required for this type
of mapping (see
> <mapping  map-id="myMapping">
>    <class-a>x.y.z.ComplexType</class-a>
>    <class-b>java.util.Map</class-b>
>    <field copy-by-reference="true">
>       <a>complexTypeField</a>
>       <b key="complexTypeFieldKeyName">this</b>
>   </field>
>   ...
> </mapping>
> DozerTypeConverterLoader has access to ClassMap and its map-id, if any, in order to construct
a lookup for map-id for a given conversion pair. This is tricky, however, since there can
be multiple mappings with different ids for the same conversion pair.
> Interfaces for Dozer and Camel Conversion may not be fully compatible but it would be
great if at least limitations can be stated in documentation.
> Regards,
> Andre Piwoni

This message was sent by Atlassian JIRA

View raw message