title: The correct way of creating a Factory for creating domain objects
body: <p>The following is the code from my service layer</p>
  
  <pre><code>@Override
      public Boolean saveTransportation(SaveTransportationCommand addServiceCommand)  {
          return getServiceAgreementDao().saveTransportation((List&lt;Transportation&gt;)ServiceAgreementFactory.get(addServiceCommand));
  }
  </code></pre>
  
  <p>I am trying to create domain objects from <code>Command object</code>, can I do validations and set values from command in Factory, is my approach correct, Or should I user Factory for only creating objects.</p>