Package org.dozer.spring.vo

Examples of org.dozer.spring.vo.Destination


    DozerBeanMapper mapper = (DozerBeanMapper) context.getBean("factoryWithMappingBuilder", DozerBeanMapper.class);

    Source source = new Source();
    source.setName("John");
    source.setId(2L);
    Destination destination = mapper.map(source, Destination.class);
    assertEquals("John", destination.getValue());
    assertEquals(2L, destination.getId());
  }
View Full Code Here


  }

  private void assertBasicMapping(Mapper mapper) {
    Source source = new Source();
    source.setId(1L);
    Destination destination = mapper.map(source, Destination.class);
    assertEquals(1L, destination.getId());
  }
View Full Code Here

    super(Source.class, Destination.class);
  }

  @Override
  public Destination convertTo(Source source, Destination destination) {
    Destination result = new Destination();
    result.setValue(injectedName);
    return result;
  }
View Full Code Here

TOP

Related Classes of org.dozer.spring.vo.Destination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.