code: public List<QueryControllerGroup> getGroups() {
  		List<QueryControllerGroup> groups = new ArrayList<QueryControllerGroup>();
  		for (QueryControllerEntity element : entities) {
  			if (element instanceof QueryControllerGroup) {
  				groups.add((QueryControllerGroup) element);
  			}
  		}
  		return groups;
  	}
docs: Returns all the groups added