code: public static GroupByPath from(final String bucket, final Class<?> entityClass) {
      String alias = String.valueOf(entityClass.getSimpleName().charAt(0));
      return Select.select(alias + ".*")
          .from(i(bucket) + " " + alias)
          .where(path(alias, CLASS).eq(s(entityClass.getName())));
    }
docs: Creates a new {@link N1qlQuery} for the given class, this method build a query like:
  
  <pre>
  select b.* from bucket b where b._class = 'model.Beer'
  </pre>
  
  @param bucket Bucket name.
  @param entityClass Entity class.
  @return A query.