Questions tagged [dozer]

Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. Typically, these Java Beans will be of different complex types.

From the Dozer website:

Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. Typically, these Java Beans will be of different complex types.

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.

530 questions
3
votes
1 answer

Dozer enum to enum mapping

Why doesn't this work with Dozer? What would I have to do to make it happen? We have a gazillion enums, and sometimes we just need to map between them. Any way we could just configure dozer to do this without writing custom stuff? enum EnumOne{…
tuxbear
  • 551
  • 4
  • 13
3
votes
1 answer

How can I express the equivalent of the is-accessible attribute using Dozer API Mappings?

The Dozer API Mappings example page does not say how to specify the equivalent of the is-accessible XML attribute. Is it possible?
chrisjleu
  • 4,329
  • 7
  • 42
  • 55
3
votes
2 answers

Java Generic Class Mapper Many to one

I've realized a little framework to Convert a generic Entity of type A to one of Type B. So I created an interface: public interface IConvert { public B convert (A entity); public List convertList(List entitylist); } And an…
Francesco Umani
  • 69
  • 4
  • 10
3
votes
2 answers

django 1.5 gunicorn workers eats memory

I am using django 1.5 and gunicorn (sync workers) Workers memory usage grow with time i try to use Dozer to find the reason, but get: AssertionError: Dozer middleware is not usable in a multi-process environment How can i found the reason of…
Evg
  • 2,978
  • 5
  • 43
  • 58
3
votes
1 answer

Custom Converter set by Dozer java API not invoked for field

I am using the Dozer framework to convert between Java Beans. I would like to create my mapping using the Java Api of Dozer instead of XML in order to be able to manipulate and configure my custom converters. If I run my converter using Alternative…
user1842096
  • 31
  • 1
  • 4
3
votes
1 answer

Dozer, InstantiationException on custom converter

I've wrote my own customer converter: public class MyFancyCustomConverter extends DozerConverter { public MyFancyCustomConverter(Class prototypeA, Class prototypeB) { super(prototypeA,…
GarfieldKlon
  • 11,170
  • 7
  • 31
  • 33
3
votes
1 answer

Dozer, how to map from java.util.Map to complex type?

I'd like to map from a java.util.Map to a complex type, let's call it Abc. java.util.Map xyz.Abc
GarfieldKlon
  • 11,170
  • 7
  • 31
  • 33
3
votes
1 answer

mapping constant values in Dozer

I want to map constants from a Java class when mapping two classes using Dozer like shown in the example mapping shown for field 2 below. Is there a cleaner approach to do this in Dozer apart from Factory Bean instances..
Greg
  • 147
  • 1
  • 5
  • 18
3
votes
2 answers

Dozer 5.3.2 on Oracle Weblogic 10.3.6

I have a problem running Dozer 5.3.2 on Oracle Weblogic 10.3.6. If I run Dozer in the container following exception occurs. In my JUnit tests Dozer works fine. java.lang.IllegalArgumentException …
Max
  • 475
  • 1
  • 10
  • 19
3
votes
1 answer

Exlude field - Mapping with Dozer

I want to exclude a field using Dozer like this : com.core.model.Model com.core.model.ModelIS person person
Anass
  • 6,132
  • 6
  • 27
  • 35
3
votes
1 answer

How to tell Dozer to use LinkedHashSet collection in destination field?

In first class i have field: private Set countries; public Set getCountries() { return countries; } public void setCountries(Set countries) { this.countries = countries; } which will contain LinkedHashSet…
3
votes
2 answers

How does Dozer Java API perform?

I have two questions related to the performance of Dozer using its Java API: In general, is mapping faster than using Dozer XML configuration? or are they about the same? How does it compare with other Java mapping frameworks, such as Orika? Thank…
dchen
  • 105
  • 1
  • 5
2
votes
1 answer

When to use mapping framework, when to map by hand?

I have a question about Parallel Object Hierarchies such as DTO. Theses hierarchies has to be somehow mapped between each other. Most straightforward method is to use simple mapping by hand. In this case you simply write code which transfers…
Ondrej Bozek
  • 10,987
  • 7
  • 54
  • 70
2
votes
1 answer

How to pass `this` to Dozer field mapping?

In my app I have Dozer mapping which looks like this: java.util.HashMap org.mycompany.TargetClass this
2
votes
2 answers

Dozer: change the field name strategy

As you know, dozer use same field name to mapping between two beans, but how can I just simple change this mapping strategy. public class Product { private String productName; public String getProductName(){ return productName; } …
chris
  • 21
  • 3