Home

News: Dozer 4.0 Java Bean Mapping Framework Released

  1. The Dozer team is pleased to announce the release of version 4.0. Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. Typically, these data objects will be of different complex types. This release contains bug fixes, feature requests, and some internal refactoring. New features include indexed mapping within deep mapping, improved support of Map backed properties, and configuration of auto string trimming. 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. Dozer not only supports mapping between attribute names, but also converting between types. Many conversion scenarios are supported out of the box, but Dozer also allows you to specify custom conversions via XML. A mapping framework is useful in a layered architecture where you are creating layers of abstraction by encapsulating changes to particular data objects vs. propagating these objects to other layers (i.e. external service data objects, domain objects, data transfer objects, internal service data objects). A mapping framework is ideal for using within Assembler type classes that are responsible for mapping from one data object to another. List of some Dozer features:
    • Indexed Property Mapping
    • Deep Property Mapping
    • Collection and Array Property Mapping
    • Inheritance Mapping
    • Map Backed Property Mapping
    • Context Based Mapping
    • Enum Mapping
    • Auto Data Type Conversion
    • Spring Integration
    • Event Listeners
    • Custom Converters
    • XMLBean and JAXB Support
    • Runtime Mapping Metrics
    • JMX Integration
    Check out the Dozer FAQ section for answers to some common questions about using Dozer. Thanks again to everyone that submitted bug and feature requests, along with everyone that contributed to the release!

    Threaded Messages (15)

  2. Dozer performance[ Go to top ]

    A framework for mapping objects across layers is really good , but what about perfomance are there any benchmarks out on Dozer performs for complex object mappings?
  3. Re: Dozer performance[ Go to top ]

    Hi Javed, Check out this link for more info on performance...... http://dozer.sourceforge.net/documentation/faq.html#dozer-perf Just let us know if you have additional questions after reading it. Thanks.
  4. Unable to Set up Dozer[ Go to top ]

    Folks , unable to set up Dozer for Eclipse . I did two things 1. Did a Software Update from Eclipse Pulg in . The Web Site does not seem to be working . 2. Unzip manualy the Dozer files into my eclipse plug in and restarted the eclipse , even that does not seem to work . Can anyone suggest me basic Steps to make Dozer work . I Use GWT .I did look into the tutorials they dont seem to be working .
  5. Hi, This looks very interesting and useful. I had a question though, after reading through the FAQ... Can you map the same source object to more than one destination object and select the destination object at runtime? Thanks in advance.
  6. We recommend using the assembler pattern for that functionality. http://dozer.sourceforge.net/documentation/advancedproperty.html Thanks for looking. Franz
  7. Configuration Question[ Go to top ]

    Is there a Java API to configure a mapping without XML?
  8. Re: Configuration Question[ Go to top ]

    Is there a Java API to configure a mapping without XML?
    There is no such Java API.
  9. Re: Configuration Question[ Go to top ]

    Is there a Java API to configure a mapping without XML?
    There is no such Java API.
    Though, to be honest, would you really need a project like Dozer to do convert from one object to another in pure Java? I would have thought a simple adapter object wrapped around the target would be a better option. This does make me wonder what sort of use cases need Dozer? Genuine question. Kit
  10. Re: Configuration Question[ Go to top ]


    This does make me wonder what sort of use cases need Dozer? Genuine question.
    Kit
    For example, you could have Hibernate Java classes, but you don't or can't expose all database fields to external client. Also, it's stupid to communicate with the whole object graph, if external client just needs small part of it. If your client is Swing or you need remote EJB calls, DTOs with conversion tool might make sense. Tomi
  11. Re: Configuration Question[ Go to top ]

    Is there a Java API to configure a mapping without XML?
    There is no such Java API.
    Do you have any plans for an java API? It'd be appreciated :) At least in my eyes Dozer's XML configuration seems a bit verbose when compared to XStream's java configuration ( http://xstream.codehaus.org/tutorial.html ). Another advantage of configuring with java is that the configuration is connected (at least in some way) to the code. For example, XStream will continue to work if class' name or package is refactored (or there will be a warning about a missing class at the startup instead of runtime). XML configuration needs special attention after refactoring which comes a pain with lots of configuration files.
    This does make me wonder what sort of use cases need Dozer? Genuine question.
    This thread discusses different use cases: http://www.theserverside.com/news/thread.tss?thread_id=38898
  12. Re: Configuration Question[ Go to top ]

    Do you have any plans for an java API?
    Was supposed to be: "Are there any plans..." :)
  13. Re: Configuration Question[ Go to top ]

    Hi Mikko, Thanks for the post. Right now there aren't any plans to add support for configuring mapping definitions via a java api. There just hasn't been a lot of requests for this type of functionality thus far, but if there is more demand for this we can certainly take a closer look at it.
  14. Dozer with JPA and GWT[ Go to top ]

    Dozer was exactly what I needed for integrating a JPA persistence layer with a Google Web Toolkit (GWT) front end. My JPA entities use Java 1.5 syntax (generics). However, GWT client classes must (at present) be Java 1.4. This mismatch is not a problem with Dozer: 1. A graph of JPA entities is obtained in the usual way i.e. EntityManager.find() 2. Dozer maps the JPA entities to corresponding Java 1.4 versions of the entities (my DTO layer). These DTOs do not use generics and are serializable so they can be send across the wire via the GWT RPC mechanism. 3. On the GWT client, the DTOs are used to render the view and they may also get modified. 4. The DTOs get sent back across the wire to the server where Dozer automatically remaps them back to the original java 1.5 JPA entities. 5. On the server a JPA EntityManger can then merge() the changes (save them). Of course, the usual validation and error checking still needs to happen. Adrian.
  15. I've been using Dozer for a few months and is finding it useful. One feature I've been missing is the possibility to map from one collection to another easily. See this forum discussion: http://sourceforge.net/forum/forum.php?thread_id=1748230&forum_id=452530 Any plans of introducing this functionality? Oyvind
  16. This feature has been requested several times so I think we should take a closer look at adding support for it. I opened a feature request for this. Thanks for the post.