Dozer Parent Project

Dozer is a powerful Java Bean to Java Bean mapper that recursively copies data from one object to another

License

License

Categories

Categories

Net
GroupId

GroupId

net.sf.dozer
ArtifactId

ArtifactId

dozer-parent
Last Version

Last Version

5.5.1
Release Date

Release Date

Type

Type

pom
Description

Description

Dozer Parent Project
Dozer is a powerful Java Bean to Java Bean mapper that recursively copies data from one object to another
Project URL

Project URL

http://dozer.sourceforge.net
Project Organization

Project Organization

dozer
Source Code Management

Source Code Management

https://github.com/DozerMapper/Dozer

Download dozer-parent

Filename Size
dozer-parent-5.5.1.pom 7 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/net.sf.dozer/dozer-parent/ -->
<dependency>
    <groupId>net.sf.dozer</groupId>
    <artifactId>dozer-parent</artifactId>
    <version>5.5.1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/net.sf.dozer/dozer-parent/
implementation 'net.sf.dozer:dozer-parent:5.5.1'
// https://jarcasting.com/artifacts/net.sf.dozer/dozer-parent/
implementation ("net.sf.dozer:dozer-parent:5.5.1")
'net.sf.dozer:dozer-parent:pom:5.5.1'
<dependency org="net.sf.dozer" name="dozer-parent" rev="5.5.1">
  <artifact name="dozer-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='net.sf.dozer', module='dozer-parent', version='5.5.1')
)
libraryDependencies += "net.sf.dozer" % "dozer-parent" % "5.5.1"
[net.sf.dozer/dozer-parent "5.5.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • core
  • spring
  • proto
  • osgi
  • osgi-test

Build Status Release Version License Code Quality: Java Total Alerts

Dozer

Active Contributors

We are always looking for more help. The below is the current active list:

Core

  • @garethahealy
  • @orange-buffalo
  • ??

Protobuf

  • @jbq
  • @garethahealy
  • ??

Spring4 / Springboot

  • @vadeg
  • @garethahealy
  • ??

Why Map?

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).

Mapping between data objects has traditionally been addressed by hand coding value object assemblers (or converters) that copy data between the objects. Most programmers will develop some sort of custom mapping framework and spend countless hours and thousands of lines of code mapping to and from their different data object.

This type of code for such conversions is rather boring to write, so why not do it automatically?

What is Dozer?

Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another, it is an open source mapping framework that is robust, generic, flexible, reusable, and configurable.

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 automatically converting between types. Most conversion scenarios are supported out of the box, but Dozer also allows you to specify custom conversions via XML or code-based configuration.

Getting Started

Check out the Getting Started Guide, Full User Guide or GitBook for advanced information.

Getting the Distribution

If you are using Maven, simply copy-paste this dependency to your project.

<dependency>
    <groupId>com.github.dozermapper</groupId>
    <artifactId>dozer-core</artifactId>
    <version>6.5.0</version>
</dependency>

Simple Example

<mapping>
  <class-a>yourpackage.SourceClassName</class-a>
  <class-b>yourpackage.DestinationClassName</class-b>
    <field>
      <a>yourSourceFieldName</a>
      <b>yourDestinationFieldName</b>
    </field>
</mapping>
SourceClassName sourceObject = new SourceClassName();
sourceObject.setYourSourceFieldName("Dozer");

Mapper mapper = DozerBeanMapperBuilder.buildDefault();
DestinationClassName destObject = mapper.map(sourceObject, DestinationClassName.class);

assertTrue(destObject.getYourDestinationFieldName().equals(sourceObject.getYourSourceFieldName()));

Versions

Version
5.5.1
5.4.0