title: Persistence Class in Java
body: <p>I am working on a JavaEE project. All/Most classes i am working on reside on the data base. There fore all must support creating, editing and deleting a database entry. 
  I don't want to use any frameworks.I planed to execute the queries using the traditional prepared statements.</p>
  
  <p>Currently I implemented it as follows</p>
  
  <pre><code>public interface Entity{
      public boolean create(Entity e);//executes a query with the objects fields
      public boolean change(Entity e);//executes a query to update fields of the entity
      public boolean delete(Entity e);//deletes the entry 
      public ArrayList&lt;Entity&gt; getAll();//retrives all the entries in the database
  }
  </code></pre>
  
  <p>Now my question</p>
  
  <ol>
  <li>I'm i doing it right? </li>
  <li>If a class inherites form a class that implements this interface how should it handel the methods? Should it override or call the super and add more code to handle more fields</li>
  <li>Should i create another utility class to send the queries or is it ok if i add the database actions in the same class?</li>
  </ol>
  
  <p>Appreciate in advance!</p>