title: How to execute HQL query in Java
body: <p>I was wondering if it is possible to execute a HQL query but in Java code. Normally I'd do something like</p>
  
  <pre><code>def result = Person.executeQuery('select and so on..')
  </code></pre>
  
  <p>but the <code>executeQuery</code> method is added at runtime and not available from Java code.</p>