title: Using JPA Criteria Api and hibernate spatial 4 together
body: <p>Given the query example here: <a href="http://www.hibernatespatial.org/tutorial-hs4.html" rel="noreferrer">http://www.hibernatespatial.org/tutorial-hs4.html</a> </p>
  
  <pre><code>Query query = em.createQuery("select e from Event e where within(e.location, :filter) = true", Event.class);
  query.setParameter("filter", filter);
  </code></pre>
  
  <p>Is it possible to rewrite the query using jpa 2 criteria api?( I am unsure  how i should  deal with the <code>within(e.location, :filter)</code> part.</p>