public static Criteria createCriteria(EntityManager entityManager, 
      Class<?> persistentClass, String alias) {
    return new CriteriaImpl( entityManager, persistentClass.getSimpleName(), alias);
  }
public static Criteria createCriteria(EntityManager entityManager, 
      Class<?> persistentClass, String alias) {
    return new CriteriaImpl( entityManager, persistentClass.getSimpleName(), alias);
  }
public static Criteria createCriteria ( EntityManager entityManager , Class < ? > persistentClass , String alias ) { return new CriteriaImpl ( entityManager , persistentClass . getSimpleName ( ) , alias ) ; }
<p>
Creates a new {@link Criteria} query for a entity class. Sets the
specified alias for the root entity. You may later use this alias to
refer to the  entity in {@link Criterion}, {@link Projection} and
{@link Order} instances.
</p>

<p>
Please note that the entity name is deduced from the unqualified class name.
You should use {@link #createCriteria(EntityManager, Class, String)}
if you have changed the entity name by using the <code>name</code> attribute
of the {@link Entity} annotation.
</p>

@param entityManager {@link EntityManager} for query creation
@param persistentClass persistent class
@param alias alias to set for the criteria
@return new {@link Criteria} query
<p > Creates a new { @link Criteria } query for a entity class . Sets the specified alias for the root entity . You may later use this alias to refer to the entity in { @link Criterion } { @link Projection } and { @link Order } instances . < / p >