title: hibernate SQLquery extract variable
body: <p>How can I extract variables total, min, max from hibernate SQL queries and assign them to java variables? </p>
  
  <pre><code>(select count(*) as total, min(price) as min, max(price) as max from product).addScalar("total", Hibernate.INTEGER).addScalar("min", Hibernate.INTEGER).addScalar("max", Hibernate.INTEGER);
  </code></pre>