title: How to correctly apply factory method to the DAO factory?
body: <p>In <strong><a href="http://www.oracle.com/technetwork/java/dataaccessobject-138824.html" rel="nofollow noreferrer">the documentation about DAO</a></strong> says:</p>
  
  <blockquote>
    <p>When the underlying storage is not subject to change from one
    implementation to another, this strategy can be implemented using the
    Factory Method pattern to produce a number of DAOs needed by the
    application. The class diagram for this case is shown in Figure 9.3.</p>
  </blockquote>
  
  <p>The figure 9.3 itself:</p>
  
  <p><img src="https://i.stack.imgur.com/gAvpY.jpg" alt="enter image description here"></p>
  
  <p>What causes misunderstanding is how we can ever apply <em>factory method</em> to produce the <em>number</em> of <code>DAO</code>s? As far as I understood in the case the DAO might be look like</p>
  
  <pre><code>public interface DAOFactory{
  
      public DAO1 getDAO1();
      public DAO2 getDAO2();
  
  }
  </code></pre>
  
  <p>But it would be not a factory method. It would be an abstract factory, because we're producing a family of objects rather than a single object. Couldn't you exlain what they meant when said</p>
  
  <blockquote>
    <p>this strategy can be implemented using the
    <em>Factory Method pattern</em> to produce a number of DAOs needed by the
    application. The class diagram for this case is shown in Figure 9.3.</p>
  </blockquote>