title: Generate java content entities
body: <p>I have a posgresql database managed with hibernate 4 and I want to know if there is a way to generate the java object entities coming from the content of the database.</p>
  
  <p>If I have an hibernate object Test :  </p>
  
  <pre><code>Test ( 
  int id, 
  String aString, 
  String anotherString 
  )
  </code></pre>
  
  <p>In the database I have in the table test : </p>
  
  <pre><code>ID,AString,AnotherString
  1,uuuu,iiii
  2,vvvv,xxxx
  </code></pre>
  
  <p>I'm looking for a method that generates a result like :</p>
  
  <pre><code>Test test1 = new Test(1,"uuuu","iiii");
  Test test2 = new Test(2,"vvvv","xxxx");
  </code></pre>