title: Dozer Boolean Mapping - Generic Method
body: <p>I came across this <a href="https://stackoverflow.com/questions/5802797/dozer-boolean-property-mapping">link</a> which seems to be the same issue that I am facing.I have around 500 classes and most of these have boolean variables. It will be difficult for me to map each and every boolean variable in XML. Is there simpler way by which this can be done - maybe defining a generic custom converter which applies to all boolean variables and uses java reflection to perform the mapping?</p>
  
  <p>EDIT:</p>
  
  <p>Example Mapping:</p>
  
  <p>Class A</p>
  
  <pre><code>private Boolean isPrimary;
  
  public Boolean isPrimary() {
      return isPrimary;
  }
  
  public void setPrimary(Boolean theIsPrimary) {
      isPrimary = theIsPrimary;
  }
  </code></pre>
  
  <p>Class B</p>
  
  <pre><code>protected java.lang.Boolean isPrimary;
  
  public java.lang.Boolean isIsPrimary() {
      return isPrimary;
  }
  
  public void setIsPrimary(java.lang.Boolean value) {
      isPrimary = value;
  }
  </code></pre>