Get field by field mapping

24 views
Skip to first unread message

Hardik Rudani

unread,
Apr 11, 2018, 8:11:46 AM4/11/18
to Dozer Mapper
I wanna know if there's any way to get field by field mapping by providing destination, source class and XML dozer file.
For example,

Class A{
String x, y, z;
}

Class B{
String x, y, z;
}

Dozer XML file has mapping of only field x.

I want something like this.

A.x mapped to B.x
A.y mapped to B.y
A.z mapped to B.z

I want this mapping in HashMap or some collections.

Gareth Healy

unread,
Apr 11, 2018, 8:34:51 AM4/11/18
to Dozer Mapper

Hardik Rudani

unread,
May 16, 2018, 7:39:48 AM5/16/18
to Dozer Mapper
I do not have class instance, I just have source class, destination class and dozer xml defined in JAR. So I do not want to create class instance.
I can't see how the example you gave will help achieving it.
Also, I tried org.dozer.metadata.MappingMetaData but it doesn't give me solid mapping.

Hardik Rudani

unread,
May 16, 2018, 7:47:26 AM5/16/18
to Dozer Mapper

p.s. I'm using 5.5.1

Reply all
Reply to author
Forward
0 new messages