GroupDefinition groupDefinition = identityService.getGroupDefinition(groupType);
Map<String,Object> map = groupDefinition.findGroups(new Page(firstResult,maxResults), queryMap);
List<GroupTo> groupTos = (List<GroupTo>)map.get("groupList");
List<Map<String,Object>> groupList = new ArrayList<Map<String,Object>>();
int count = (Integer)map.get("count");
Pagination page = new Pagination(pageIndex,rowNum);
page.setTotal(count);
for(GroupTo group : groupTos){
Map<String,Object> groupMap = new HashMap<String,Object>();
groupMap.put("groupId",group.getGroupId());
groupMap.put("groupName", group.getGroupName());