Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java ModelMapper class

modelMapper.typeMap(Order.class, OrderDTO.class).addMappings(mapper -> {
  mapper.map(src -> src.getBillingAddress().getStreet(),
      Destination::setBillingStreet);
  mapper.map(src -> src.getBillingAddress().getCity(),
      Destination::setBillingCity);
});
Source by modelmapper.org #
 
PREVIOUS NEXT
Tagged: #java #ModelMapper #class
ADD COMMENT
Topic
Name
1+3 =