Dozer - DTO to Business object (Bo) data transfer
Dozer is a powerful, but simple Java Bean to Java Bean mapper that recursively copies data from one object to another.
Dozer supports simple property mapping, complex type mapping, bi-directional mapping, implicit-explicit mapping, as well as recursive mapping. This includes mapping collection attributes that also need mapping at the element level.
This is different from Bean utils, which copies the data recursively for the object which has the same property names. Bean-Utils has a restriction for working with complex data types.
Dozer tool can be found here
here’s some of the key advantages found on Dozer
- Can define the mapping / exlude mapping in a configuration mapping file.
- Support for Spring (tested Dozer 3.0/ 3.1 with Spring 2.0).
Recommanded Usage Scenario:
- Highly recommanded for the scenarios, where the usage of design patterns for Data Transfer Object (Dto) and Business Objects (Bo).
- For scenario of Data transfer from UI form elements to Data transfer objects (Dto).
Disadvantages for Dozer
- I used this tool under Java 5/ Spring 2.0. Dozer was instantiated using Spring. our architecture was like, all the business Objects (Bo) were placed in one project. Had a facade (facade has Dto) for a set of functionalitie. Now the problem was the definition of spring configuration for the dozer, as Dto and Bo were present in various projects, so this created a need for the definition spring configuration definition on a top level project than at leaf level.
Written by Ravi Nallakukkala on March 25th, 2007 with
no comments.
Read more articles on Spring and Tools.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article