DTO and mapper generation from Domain Objects

Posted by Nicolas on Stack Overflow See other posts from Stack Overflow or by Nicolas
Published on 2010-05-13T16:13:24Z Indexed on 2010/05/13 16:24 UTC
Read the original article Hit count: 326

Filed under:
|
|
|

I have plenty of java domain objects that I need to transform to DTOs.

Please, don't start with the anti-pattern thing, the Domain Objects are what they are because of a long history, and I can't modify them (or not too much, see below).

So, of course, we've passed the age of doing all that manually. I've looked around, and dozer seems the framework of choice for DTO mapping.

But... what I'd really like is this: annotate classes and fields that I want in DTO, and run a tool that would generate the DTOs and the mappers.

Does that sound too unreasonable?

Does such a tool already exist?

© Stack Overflow or respective owner

Related posts about dto

Related posts about code-generation