title: Deprecated createCriteria method in Hibernate 5
body: <p>This calling is deprecated:</p>
  
  <pre><code>session.createCriteria(Bus.class).list();
  </code></pre>
  
  <p>In source files I can see this:</p>
  
  <pre><code>/** @deprecated */
  @Deprecated
  Criteria createCriteria(Class var1);
  
  /** @deprecated */
  @Deprecated
  Criteria createCriteria(Class var1, String var2);
  
  /** @deprecated */
  @Deprecated
  Criteria createCriteria(String var1);
  
  /** @deprecated */
  @Deprecated
  Criteria createCriteria(String var1, String var2);
  </code></pre>
  
  <p>But I can't understand which method I have to use instead of <code>createCriteria</code>.</p>