DTO and mapper generation from Domain Objects

Use GeDA - much faster and more flexible than all of the mentioned mappers. http://inspire-software.com/confluence/display/GeDA/GeDA+-+Generic+DTO+Assembler

There aren't many examples on the wiki but the junits (in source) are full of them


Consider checking out my ModelMapper.

It differs from Dozer and others in that it minimizes the amount of configuration needed by intelligently mapping object models. Where configuration is needed, ModelMapper offers a refactoring safe API that uses actual code to map properties and values rather than using string references or XML.

Check out the ModelMapper site for more info:

http://modelmapper.org


This thread is a bit old, but if anyone is is still trying to do this, http://www.dtonator.org/ is the best option I have found so far. It is the only tool I have been able to find that actually CREATES the DTO files and isn't tied to a specific framework (Spring, Seam, etc.) or IDE.


You might be interested in MapStruct, a code generator for JavaBeans mappers. You'd have to implement source model (e.g. your domain objects) and target model (e.g. DTOs), and MapStruct generates type-safe and fast code for mapping between these models (disclaimer: I'm the author of this project).