title: How to get all the element from JDBC query
body: <p>HI, </p>
  
  <p>I have query like this </p>
  
  <pre><code>final Query contractQuery = cgnDao.getEntityManager().
              createNativeQuery("SELECT k.phrase, ak.type FROM key k INNER JOIN adkey ak USING (key_id) WHERE pck.pub_id =" + pid +" AND pck.c_id =" + campId );
  </code></pre>
  
  <p>How can i get each and every element from the query? </p>
  
  <p>Where phrase is an String and type is enum</p>
  
  <p>in Java </p>
  
  <p>Thanks</p>