title: How can you call custom database functions with Hibernate?
body: <p>If I were to define some function in the database (perhaps Postgres, or any other database):</p>
  
  <pre><code>create or replace function isValidCookie(ckie);
  </code></pre>
  
  <p>I would call it from SQL as:</p>
  
  <pre><code>select * from cookietable c where isValidCookie(c.cookie);
  </code></pre>
  
  <p>How can I call a custom function such as this from Hibernate?</p>