title: using Spring DATA to implement DAO
body: <p>My requirement is this: I have to create a AccountRepository interface and i have to implement all methods in my AccountRepositoryImpl itself, so how can I do this?</p>
  
  <p>Example:</p>
  
  <p>1) interface </p>
  
  <pre><code>/* this is the interface */  
  public interface AccountRepository extends JpaRepository
  {
      List&lt;Account&gt; getAllAccounts();
  }
  </code></pre>
  
  <p>2) implementation ?</p>
  
  <pre><code>public class AccountRepositoryImpl implements AccountRepository
  {
      public List&lt;Account&gt; getAllAccounts() {
          // now what?
      }
  }
  </code></pre>