views:

203

answers:

0

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?