posted 6 years ago
I have two classes, say Product and ProductTO :
Other than fields, Product class also have several other different classes present as Collection (oneToMany), same goes with ProductTO.
When I use Dozer for mapping fields from entity Product to ProductTO, Dozer by default does copy all fields having same field names, but I don't want to copy all fields. Rather I will define a mehtod findFinishedProduct(), which will copy selected fields from Product to ProductTO while another method findScrapMaterial() will copy different set of fields from Product to ProductTO.
Is there any way to define a set of fields, say in xml configuration file, which I can refer in different methods while copying. How can I accomplish this with Dozer efficiently ?
Thanks.