title: How to map different Java-Bean structures onto one another
body: <p>In our project we have to map one nested structures of beans onto another. (These are actually JAXB mapped Java-Representations of XML documents that, say, represent an incoming order document.) This has to be mapped onto the quite different order document structure of another system.</p>
  
  <p>What are the options to do this? I would prefer something that fulfills the following requirements:</p>
  
  <ol>
  <li>The mapping should alert me when the mapping of one field was not defined</li>
  <li>The mapping should have some defaults, like mapping fields of equal names onto one another and providing standard mappings for, say, int to String and vice versa.</li>
  <li>The mapping should be bidirectional.</li>
  <li>One should be able to use code completion when defining the mapping.</li>
  </ol>
  
  <p>A promising framework for this is <a href="http://dozer.sourceforge.net/" rel="noreferrer">Dozer</a>, but it does not fulfill 1 and 4. Same with <a href="http://jbeanmapper.sourceforge.net/" rel="noreferrer">JBeanMapper</a>. Just programming it in Java does 4 but not the other requirements; using XSLT fulfills perhaps 2 but nothing else. Do you have better ideas?</p>