title: Can we define all the Named Queries at one place like some property file instead of writing in the entity class
body: <p>How to Define <strong>All Named Queries</strong> in <strong>One place</strong> (like class) instead of writing the <strong>NamedQuery</strong> in top of <strong>Entity class.</strong> </p>
  
  <p>For Example i have a base class. In this class i can define all named queries.</p>
  
  <p>Base.java</p>
  
  <pre><code>@Entity
  @NamedQueries({
      @NamedQuery(name="Student.findAll", query="SELECT s FROM Student s"),
      @NamedQuery(name="Employee.findAll", query="SELECT e FROM Employee e")})    
  class Base {
  
  }
  </code></pre>
  
  <p>Assume now i have two entities like Student and Employee. Now i want to access the Named query from Base class. It is possible to access. If is possible then how.</p>
  
  <pre><code>class Employee {
  
  }
  
  class Student {
  
  }
  </code></pre>
  
  <p>In employee class, Student i want to access the named query from Base class. It is possible. If it is possible how i can access.</p>