title: JPA - Select All Rows from Dynamic Table Name
body: <p>Hi guys I am new to jpa, named queries, etc.. and I need something like this:</p>
  
  <pre><code>select t from :tableName t
  </code></pre>
  
  <p>Later in code I want something like this:</p>
  
  <pre><code>em.createQuery(...);
  setParameter("tableName", "Person")
  </code></pre>
  
  <p>Result would be:</p>
  
  <pre><code>select * from person
  </code></pre>
  
  <p>How to write such a generic jpa query statement allowing to select all rows from :tableName which may be defined at runtime? thanks in advance</p>