title: How to create an 'instance of' -like query in JPA 2.0?
body: <p>Say we've got an abstract @Entity Animal, and several entity classes that extend Animal, including Dog, Cat, Monkey and Bat.</p>
  
  <p>How can I filter the results based on the extending entity's class?</p>
  
  <p><em>Example</em>:
  There are checkboxes where the user can select which entities to retrieve.</p>
  
  <pre><code>[ ] Dog
  [X] Cat
  [X] Monkey
  [ ] Bat
  </code></pre>
  
  <p>Now I want to retrieve the entities with a (Named)Query defined in the <code>Animal</code> class. What kind of query parameters can I put into the query so that only the Cat and Monkey objects will be returned?</p>