title: Should DTOs use inheritance or composition
body: <p>In SOA if a few DTO classes have some fields that are repeated across. Is it better to use Composition or Inheritance so there is not repetition OR just use one DTO class that encapsulates all fields.As my DTO classes grow I see lot of repetitive field names and Sonar report is crying fowl. What is the best approach(or an alternative).</p>
  
  <p>e.g.</p>
  
  <pre><code>public class DocDto{
      private Long id;
      private String name;
      private String docType
  }
  
  public class DocReviewDto{
      private Long id;
      private String name;
      private String status;
      private String comment;
  }
  </code></pre>