title: Java EE and Entity : best way to get results from a DB
body: <p>I am currently learning Java EE and how to use JPA. </p>
  
  <p>I have made a great database, which one of its table got more than 20 fields. </p>
  
  <p>I was wondering what is the best way to get the results from the DB. </p>
  
  <p>Currently, I am using a <code>@NamedQuery</code> which takes like 12 or 13 parameters. </p>
  
  <p>I was wondering if I could instead use the <code>findAll()</code> method, then do a loop that verifies with <code>.contains()</code> (for a String of course) if the record is what I am looking for. </p>
  
  <p>From my point of view, this looks less complicated using the second method, maybe because I'm better with Java than JPA (at the moment) </p>
  
  <p>Any piece of advice would be greatly appreciated, thank you very much </p>