Dozer :: Tests :: JMH Tests

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

License

License

Categories

Categories

JMH Application Testing & Monitoring Performance analysis
GroupId

GroupId

com.github.dozermapper.tests
ArtifactId

ArtifactId

dozer-jmh-tests
Last Version

Last Version

6.5.2
Release Date

Release Date

Type

Type

jar
Description

Description

Dozer :: Tests :: JMH Tests
Dozer is a powerful Java Bean to Java Bean mapper that recursively copies data from one object to another
Project Organization

Project Organization

dozer

Download dozer-jmh-tests

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.dozermapper.tests/dozer-jmh-tests/ -->
<dependency>
    <groupId>com.github.dozermapper.tests</groupId>
    <artifactId>dozer-jmh-tests</artifactId>
    <version>6.5.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.dozermapper.tests/dozer-jmh-tests/
implementation 'com.github.dozermapper.tests:dozer-jmh-tests:6.5.2'
// https://jarcasting.com/artifacts/com.github.dozermapper.tests/dozer-jmh-tests/
implementation ("com.github.dozermapper.tests:dozer-jmh-tests:6.5.2")
'com.github.dozermapper.tests:dozer-jmh-tests:jar:6.5.2'
<dependency org="com.github.dozermapper.tests" name="dozer-jmh-tests" rev="6.5.2">
  <artifact name="dozer-jmh-tests" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.dozermapper.tests', module='dozer-jmh-tests', version='6.5.2')
)
libraryDependencies += "com.github.dozermapper.tests" % "dozer-jmh-tests" % "6.5.2"
[com.github.dozermapper.tests/dozer-jmh-tests "6.5.2"]

Dependencies

compile (2)

Group / Artifact Type Version
com.github.dozermapper : dozer-core jar 6.5.2
org.openjdk.jmh : jmh-core jar

provided (1)

Group / Artifact Type Version
org.openjdk.jmh : jmh-generator-annprocess jar

test (5)

Group / Artifact Type Version
org.hamcrest : hamcrest-all jar
org.junit.vintage : junit-vintage-engine jar
org.mockito : mockito-core jar
org.slf4j : slf4j-simple jar
org.slf4j : jcl-over-slf4j jar

Project Modules

There are no modules declared in this project.

Build Status Release Version License Code Quality: Java Total Alerts

Dozer

Project Activity

The project is currently not active and will more than likely be deprecated in the future. If you are looking to use Dozer on a greenfield project, we would discourage that. If you have been using Dozer for a while, we would suggest you start to think about migrating onto another library, such as:

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.2</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
6.5.2
6.5.0
6.4.1
6.4.0
6.3.0
6.2.0