Question

I simply want to know what is the benefit of using Dozer in project. Here I am really confuse How to use ? and Why I use ? Please help me. I want to map my entity classes to Dto classes and want data flow on my gui through dto classes. And when I saved any data from Gui to DB then I want to convert my Dto Class to Dao Class.

Was it helpful?

Solution

  • Dozer is about mapping a Java Bean to another Java Bean for some field based value propagation and it is all about in memory objects.
  • While Hibernate is about mapping POJO (Domain objects) to a relational database.

So as you can see, they are not apparentely related one to the other, and any need to use both of them should be upon a personal choice.

As your question has been edited:

  • A basic conceptual architecture should be to map your Entities (Domain Objects - you did call it dao classes) through Hibernate to a database.
  • Then those Entities can be mapped to some Java Beans (which you did call dto classes) using Dozer.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top