• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mapping utility

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I would like to know your suggestions on the best approach for mapping utility between POJO's.
What we want to create is a mapper utility to transform our domain objects into transfer objects.
Say I have an object CustomerDO which can comprise of a deep object graph like AddressDO, PersonalDO etc.

Now when I receive this object I want to map this object transparently into a our own application specific POJO's so for CustomerDO we will have an equivalent CustomerTO.

I want to know what is the best approach for doing this transport of values between two structurally similar classes. Should I use reflection or plain getter/setter or any other approach.

Do post your thoughts on the same

Regards
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try Apache's Bean Util
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic