DTO to Entity Mapping Tool

断了今生、忘了曾经 提交于 2019-12-03 06:54:40
nemesv

You can have a look on the two most used Object-Object mapper:

AutoMapper

AutoMapper is a simple little library built to solve a deceptively complex problem - getting rid of code that mapped one object to another. This type of code is rather dreary and boring to write, so why not invent a tool to do it for us?

Value Injecter

ValueInjecter lets you define your own convention-based matching algorithms (ValueInjections) in order to match up (inject) source values to destination values.

There is a comparison article on SO: AutoMapper vs ValueInjecter

You can use GeDA for mapping any entity to a DTO object, it comes with either annotations or DSL support.

http://inspire-software.com/confluence/display/GeDA/FAQ

There are only basic examples on the wiki but jUnits of source code are full of useful examples

You can get it from sourceforge or google code manually or via maven dependency

Details are here: http://inspire-software.com/confluence/display/GeDA/GeDA+-+Generic+DTO+Assembler

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!