title: Design Pattern for object conversion
body: <p>I am looking for advice on the best pattern to use for the following scenario.</p>
  
  <p>Involves converting from a domain level object to a UI DTO</p>
  
  <p>For the object in question, <code>BeanUtils</code> or <code>PropertyUtils</code> will perform most of the conversion.</p>
  
  <p>My domain level object contains a "type" attribute. Based on this type, we need to set a DTO "label" property to a friendly name.</p>
  
  <ul>
  <li>So for type AAA, we need to create a label as follows: <code>property1 + "-" + property2</code></li>
  <li>For type BBB, we need to create a label as follows: <code>property2 + "/" + property1</code></li>
  <li>For type CCC, we need to create a label based on a database query</li>
  </ul>
  
  <p>(The above logic is oversimplified)</p>
  
  <p>Without researching all possible design patterns, I have the following pattern in mind:</p>
  
  <ol>
  <li>Create a number of LabelCreationStrategies, one for each type </li>
  <li>In my     object conversion helper, inject a map that maps "type" to strategy</li>
  <li>So when the object conversion takes place, it will find the
  appropriate strategy, and create the most appropriate label.</li>
  </ol>
  
  <p>What other patterns would work here?</p>
  
  <p>Thanks</p>