title: Hibernate.INTEGER is unavailable, when the Hibernate version is upgraded to 4.2.0.CR1
body: <p>I have just upgraded Hibernate from 3.2.5 to <a href="http://sourceforge.net/projects/hibernate/files/hibernate4/4.2.0.CR1/hibernate-release-4.2.0.CR1.zip/download">4.2.0.CR1</a>. I was using something like the following methods in DAO classes to locate the current row number in Oracle 10g with the <code>createSQLQuery()</code> method.</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT row_num
  FROM   (SELECT row_number()
                   OVER (
                     ORDER BY banner_id DESC) AS row_num,
                 banner_id
          FROM   banner_images
          ORDER  BY banner_id DESC)
  WHERE  banner_id = :id
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Override
  @SuppressWarnings("unchecked")    
  public int getCurrentRow(String id, int rowsPerPage)
  {        
      return (Integer) sessionFactory
                      .getCurrentSession()
                      .createSQLQuery("Above query")
                      .addScalar("row_num", Hibernate.INTEGER)  //&lt;------- ???
                      .setParameter("id", Long.parseLong(id))
                      .uniqueResult();
  }
  </code></pre>
  
  <p>The <code>.addScalar("row_num", Hibernate.INTEGER)</code> method as shown in the above code snippet, issues a compile-time error.</p>
  
  <pre><code>cannot find symbol
  symbol:   variable INTEGER
  location: class Hibernate
  </code></pre>
  
  <p>It is not available in the <code>org.hibernate.Hibernate</code> class. The NetBeans IDE I'm using is 7.2.1 is not listing such a constant. Google search couldn't lead me to the actual solution. So what is the alternative in this version of Hibernate (4.2.0.CR1)?</p>