if (page != null) {
Pagination pagination = Context.getProcessEngineConfiguration().getDbConfig().getPagination();
sql = pagination.getPaginationSql(sql, page.getFirstResult(), page.getMaxResults(), "*",null);
}
List<Map<String, Object>> dataObj = sqlCommand.queryForList(sql, null);
int count = Integer.parseInt(sqlCommand.queryForValue(countSql).toString());
for(int i = 0;i<dataObj.size();i++){
if (dataObj.get(0).get(groupIdField) != null) {
GroupTo groupTo = new GroupTo(StringUtil.getString(dataObj.get(i).get(groupIdField)), StringUtil.getString(dataObj.get(i).get(groupNameField)), getId(), dataObj.get(i));
resultList.add(groupTo);
}