【发布时间】:2014-03-31 12:46:20
【问题描述】:
我需要使用 Orika 将一个属性映射到多个属性,并且正在努力寻找合适的示例。
给定以下类:
public class A {
String propertyA1
String propertyB1
}
public class B {
C cInstance;
D dInstance;
String propertyB2;
}
public class C {
String propertyA2Part;
}
public class D {
String propertyA3Part;
}
基本上我将 A 类映射到 B 类,但在此过程中我需要解析 propertyA1 并将值发送到 C.propertyA2Part 和 D.propertyA3Part。我正在尝试确定转换器/映射器/过滤器之间的最佳工具。
【问题讨论】: