Global field mappings

39 views
Skip to first unread message

Zachariah Kendall

unread,
May 29, 2014, 6:14:10 PM5/29/14
to dozer-...@googlegroups.com
I have some fields that will exists in over a hundred mappings.

Example:
  <field custom-converter="converter.IsoToIsDuplicateHourConverter">
 <a>id.hour</a>
<b>IsDuplicateHour</b>
  </field>

These field types and names are the same, but the containing classes are always different. Is there a way to specify this instead of pasting it into every mapping?

Thanks.

Ashish Thukral

unread,
Mar 10, 2015, 4:15:36 PM3/10/15
to dozer-...@googlegroups.com
you can use a global custom converter

<configuration>
    <custom-converters> <!-- these are always bi-directional -->
      <converter type="org.dozer.converters.TestCustomConverter" >
        <class-a>org.dozer.vo.CustomDoubleObject</class-a>
        <class-b>java.lang.Double</class-b>
      </converter>
Reply all
Reply to author
Forward
0 new messages