I\'m trying to map a Java DTO object to an existing JPA entity object without having to do something like the following:
public MyEntity mapToMyEntity(SomeDT
You can use dozer mapper or gson.
DozerMapper ex:
Mapper mapper = DozerBeanMapperBuilder.createDefault(); DestinationObject destObject = mapper.map(sourceObject,DestinationClassName.class);
You can check github page for more information