title: Hibernate getting Id from createCriteria() result
body: <p>I have a method that takes a list of entities (<code>Class</code>es) and does some computation. To describe my needs here is the simplest outline of the method (pseudo-code):</p>
  
  <pre><code>public void do(List&lt;Class&lt;?&gt; entities) {
      for (Class&lt;?&gt; entity : entities) {
          List&lt;?&gt; list = session.createCriteria(entity).list();
          for (Object o : list) {
              System.out.println(o.getClass().getSimpleName() + " " + o.getId());
          }
      }
  }
  </code></pre>
  
  <p>Is there a way that I can access/get the Id of <strong><code>o</code></strong>?</p>