code: public DataSet query(final Class<?> targetClass, Collection<String> selectColumnNames, Condition whereClause, String groupBy, String having, String orderBy,
              int offset, int count) {
          if (N.isNullOrEmpty(selectColumnNames)) {
              selectColumnNames = ClassUtil.getPropGetMethodList(targetClass).keySet();
          }
  
          final String[] columns = selectColumnNames.toArray(new String[selectColumnNames.size()]);
          final Type<Object>[] selectColumnTypes = new Type[columns.length];
  
          for (int i = 0, len = columns.length; i < len; i++) {
              selectColumnTypes[i] = Type.valueOf(ClassUtil.getPropGetMethod(targetClass, columns[i]).getReturnType());
          }
  
          return query(ClassUtil.getSimpleClassName(targetClass), columns, selectColumnTypes, whereClause, groupBy, having, orderBy, offset, count);
      }
docs: Find the records from database with the specified <code>whereClause, groupby, having, orderBy</code> and return the result set.
  
  @param targetClass an entity class with getter/setter methods.
  @param selectColumnNames
  @param whereClause Only binary(=, <>, like, IS NULL ...)/between/junction(or, and...) are supported.
  @param groupBy A filter declaring how to group rows, formatted as an SQL GROUP BY clause (excluding the GROUP BY itself). Passing null will cause the rows to not be grouped.
  @param having A filter declare which row groups to include in the cursor, if row grouping is being used, formatted as an SQL HAVING clause (excluding the HAVING itself). Passing null will cause all row groups to be included, and is required when row grouping is not being used.
  @param orderby How to order the rows, formatted as an SQL ORDER BY clause (excluding the ORDER BY itself). Passing null will use the default sort order, which may be unordered.
  @param offset
  @param count
  @return