title: Can parse a projection interface to object? Spring
body: <p>Actually have a projection interface in Spring. Like this:</p>
  
  <pre><code>public interface DaoObjectProjection{
      Integer getTotalAmount();
      String getCode();
      String getName();
      String getLastName();
  }
  
  </code></pre>
  
  <p>And i want send this to another microservice, i know cant send the interface because the proxy funcionality dont work if use RestTemplate. For thar reason i use an another Object like that:</p>
  
  <pre><code>public class ObjectWantSend {
      private Integer totalAmount;
      private String code;
      private String name;
      private String lastName;
  
  //Getters
  //Setters
  
  }
  
  </code></pre>
  
  <p>My question if exist any way to parse directly my projection interface into this object or need setting one by one like this:</p>
  
  <pre><code>ObjectWantSend.setTotalAmount(DaoObjectProjection.getTotalAmount);
  </code></pre>
  
  <p>I am using Hibernate with Spring.</p>