-1

I am using dozer to map my DTO objects from domain objects. How can map the result of a getter method from the domain object to a filed in the destination Object

Class Domain{

public boolean getSomethig() {
     return somebooleanValue;
  }

}

Class Destination{

private boolean flag;

public void setFlag(final boolean flag){
   this.flag = flag;
}
public void getFlag(){
   return this.flag;
}
Luís Cruz
  • 14,780
  • 16
  • 68
  • 100
kumar
  • 11
  • 2

1 Answers1

1

Okay after playing it for a while i found the answer.. Dozer just prefixes either get or is (boolean) for the name we specified in the mapping so..i defined my mapping as follows..

<mapping type="one-way">
    <class-a>Domain</class-a>
    <class-b>Destination</class-b>
    <field>
       <a>something</a>
       <b>flag</b>
    </field>
</mapping> 
kumar
  • 11
  • 2