Gets an iterable of all the groups in the enterprise.
@param  api the API connection to be used when retrieving the groups.
@param fields the fields to retrieve.
@return     an iterable containing info about all the groups.
974945
public static Iterable<BoxGroup.Info> getAllGroups(final BoxAPIConnection api, String ... fields) {
        final QueryStringBuilder builder = new QueryStringBuilder();
        if (fields.length > 0) {
            builder.appendParam("fields", fields);
        }
        return new Iterable<BoxGroup.Info>() {
            public Iterator<BoxGroup.Info> iterator() {
                URL url = GROUPS_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), builder.toString());
                return new BoxGroupIterator(api, url);
            }
        };
    }
329362
protected Iterator findParentGroups(IEntity ent) throws GroupsException {
        if (log.isDebugEnabled()) log.debug(DEBUG_CLASS_NAME + ".findParentGroups(): for " + ent);

        List groups = new ArrayList();
        File root = getFileRoot(ent.getType());
        if (root != null) {
            File[] files = getAllFilesBelow(root);

            try {
                for (int i = 0; i < files.length; i++) {
                    Collection ids = getEntityIdsFromFile(files[i]);
                    if (ids.contains(ent.getKey())) {
                        groups.add(find(files[i]));
                    }
                }
            } catch (IOException ex) {
                throw new GroupsException("Problem reading group files", ex);
            }
        }

        return groups.iterator();
    }
1290763
public BoxResourceIterable<BoxCollaboration.Info> getAllFileCollaborations(String... fields) {
        return BoxCollaboration.getAllFileCollaborations(this.getAPI(), this.getID(),
                GET_COLLABORATORS_PAGE_SIZE, fields);

    }
120747
private Map<String, Field> getFieldsbyid() {
        if (fieldsbyid == null) {
            fieldsbyid = new HashMap<String, Field>();
            for (Field f : getAllFields()) {
                fieldsbyid.put(f.getId(), f);
            }
        }
        return fieldsbyid;
    }
948547
@Override
    public Map<FieldDescriptor, Object> getAllFields() {
        TreeMap<FieldDescriptor, Object> result = new TreeMap<FieldDescriptor, Object>();
        for (final FieldDescriptor field : metadata.descriptor.getFields()) {
            if (hasField(field)) {
                result.put(field, getField(field));
            }
        }
        return Collections.unmodifiableMap(result);
    }
629374
public SqlBuilder groupBy(String... fields) {
		if (ArrayUtil.isNotEmpty(fields)) {
			if (null != wrapper) {
				// 包装字段名
				fields = wrapper.wrap(fields);
			}

			sql.append(" GROUP BY ").append(ArrayUtil.join(fields, StrUtil.COMMA));
		}

		return this;
	}
283450
private List<Group> getGroups() throws Exception {
        List<Group> groups = new ArrayList<Group>();
        List<Group> sourceGroups = PathOverrideService.getInstance().findAllGroups();

        // loop through the groups
        for (Group sourceGroup : sourceGroups) {
            Group group = new Group();

            // add all methods
            ArrayList<Method> methods = new ArrayList<Method>();
            for (Method sourceMethod : EditService.getInstance().getMethodsFromGroupId(sourceGroup.getId(), null)) {
                Method method = new Method();
                method.setClassName(sourceMethod.getClassName());
                method.setMethodName(sourceMethod.getMethodName());
                methods.add(method);
            }

            group.setMethods(methods);
            group.setName(sourceGroup.getName());
            groups.add(group);
        }

        return groups;
    }
517194
public List<String> getGroups(String... groups) {
        synchronized (Hdf5Archive.LOCK_OBJECT) {
            if (groups.length == 0)
                return getObjects(this.file, H5O_TYPE_GROUP);
            Group[] groupArray = openGroups(groups);
            List<String> ls = getObjects(groupArray[groupArray.length - 1], H5O_TYPE_GROUP);
            closeGroups(groupArray);
            return ls;
        }
    }
370601
private static List<String> resolveFields(final Iterable<? extends String> fields) {
        final List<String> fieldList = new ArrayList<String>();

        for (final String field : fields) {
            Validate.isTrue(StringUtils.isNotBlank(field), "One of the specified fields was blank");
            fieldList.add(field.trim());
        }

        return fieldList;
    }
1074685
public Iterable<BoxGroupMembership.Info> getAllMemberships(String ... fields) {
        final QueryStringBuilder builder = new QueryStringBuilder();
        if (fields.length > 0) {
            builder.appendParam("fields", fields);
        }
        return new Iterable<BoxGroupMembership.Info>() {
            public Iterator<BoxGroupMembership.Info> iterator() {
                URL url = USER_MEMBERSHIPS_URL_TEMPLATE.buildWithQuery(
                        BoxUser.this.getAPI().getBaseURL(), builder.toString(), BoxUser.this.getID());
                return new BoxGroupMembershipIterator(BoxUser.this.getAPI(), url);
            }
        };
    }
108570
public static List<Field> getAllFields(List<Field> fields, Class<?> clazz)
  {
    for (Field field : clazz.getDeclaredFields())
    {
      fields.add(field);
    }

    if (clazz.getSuperclass() != null)
    {
      fields = getAllFields(fields, clazz.getSuperclass());
    }

    return fields;
  }
949768
public static Iterable<BoxFileVersionRetention.Info> getAll(BoxAPIConnection api, String ... fields) {
        return getRetentions(api, new QueryFilter(), fields);
    }
486673
def get_many(self, ids):
        """"""
        return [self.instance(id, **fields)
                    for id, fields in zip(ids, self.api.mget(ids))]
305336
List getGroupby()
    {
        List result = _getGroupby();
        Iterator iter = getCriteria().iterator();
        Object crit;

        while (iter.hasNext())
        {
            crit = iter.next();
            if (crit instanceof Criteria)
            {
                result.addAll(((Criteria) crit).getGroupby());
            }
        }

        return result;
    }
1093349
@Override
    public Set<String> getGroups(String user) throws IOException {
        if (cachedGroups.containsKey(user)) {
            return cachedGroups.get(user);
        }
        Set<String> groups = getUnixGroups(user);
        if (!groups.isEmpty())
            cachedGroups.put(user, groups);
        return groups;
    }
74278
@Override
    public IGroupByDocumentQuery<T> groupBy(String fieldName, String... fieldNames) {
        _groupBy(fieldName, fieldNames);

        return new GroupByDocumentQuery<>(this);
    }
1155629
def get_ngroups(self, field=None):
        '''
        
        '''
        field = field if field else self._determine_group_field(field)
        if 'ngroups' in self.data['grouped'][field]:
            return self.data['grouped'][field]['ngroups']
        raise ValueError("ngroups not found in response. specify group.ngroups in the query.")