推土机将原始映射为double

时间:2016-03-10 20:38:22

标签: java double dozer

我需要将这些类Foo和Foo2映射到一起

Class Foo{

    private double averageBalance;
    // getters and setters
    }

Class Foo2{

    private Double averageCurrentBalance;
    // getters and setters

    }


Now I want to do mapping between Classes Foo and Foo2, something like this:

<mapping>
    <class-a>Foo</class-a>
    <class-b>Foo2</class-b>
    <field>
        <a>averageBalance</a>
        <b>averageCurrentBalance</b>
    </field>
</mapping>

但这不起作用,我正在寻找一些自定义转换器,无法找到。 有人可以帮忙吗?

0 个答案:

没有答案