Retrieves all groups at the root level of a KeePass database.

@return a list of root level groups
@see Group
498794
public List<Group> getTopGroups() {
        if (root != null && root.getGroups() != null && root.getGroups().size() == 1) {
            return root.getGroups().get(0).getGroups();
        }
        return new ArrayList<Group>();
    }
872486
public List<Group> findAllGroups() {
        ArrayList<Group> allGroups = new ArrayList<Group>();
        PreparedStatement queryStatement = null;
        ResultSet results = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            queryStatement = sqlConnection.prepareStatement("SELECT * FROM "
                                                                + Constants.DB_TABLE_GROUPS +
                                                                " ORDER BY " + Constants.GROUPS_GROUP_NAME);
            results = queryStatement.executeQuery();
            while (results.next()) {
                Group group = new Group();
                group.setId(results.getInt(Constants.GENERIC_ID));
                group.setName(results.getString(Constants.GROUPS_GROUP_NAME));
                allGroups.add(group);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (queryStatement != null) {
                    queryStatement.close();
                }
            } catch (Exception e) {
            }
        }

        return allGroups;
    }
1129086
public KeePassFileBuilder addTopGroups(Group... groups) {
        for (Group group : groups) {
            rootBuilder.addGroup(group);
        }

        return this;
    }
1373000
public java.util.List<SecurityGroupReference> getSecurityGroupReferenceSet() {
        if (securityGroupReferenceSet == null) {
            securityGroupReferenceSet = new com.amazonaws.internal.SdkInternalList<SecurityGroupReference>();
        }
        return securityGroupReferenceSet;
    }
553593
public java.util.List<DBSecurityGroupMembership> getDBSecurityGroupMemberships() {
        if (dBSecurityGroupMemberships == null) {
            dBSecurityGroupMemberships = new com.amazonaws.internal.SdkInternalList<DBSecurityGroupMembership>();
        }
        return dBSecurityGroupMemberships;
    }
1079650
public function getGroups()
    {
        if ($this->groups === null) {
            $this->setGroups($this->groupRepository->getAllByRevision($this));
        }
        return $this->groups;
    }
1364705
public java.util.List<String> getInstanceGroupTypes() {
        if (instanceGroupTypes == null) {
            instanceGroupTypes = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return instanceGroupTypes;
    }
421289
public List<Cluster<M>> getAllClusters() {
    ArrayList<Cluster<M>> res = new ArrayList<>(hierarchy.size());
    for(It<Cluster<M>> iter = hierarchy.iterAll(); iter.valid(); iter.advance()) {
      res.add(iter.get());
    }
    Collections.sort(res, Cluster.BY_NAME_SORTER);
    return res;
  }
968584
protected List<SnakGroup> getQualifierGroups() {
		ArrayList<SnakGroup> result = new ArrayList<>(this.qualifiers.size());
		for (ArrayList<Snak> statementList : this.qualifiers.values()) {
			result.add(factory.getSnakGroup(statementList));
		}
		return result;
	}
1104496
public java.util.List<InstanceGroup> getInstanceGroups() {
        if (instanceGroups == null) {
            instanceGroups = new com.amazonaws.internal.SdkInternalList<InstanceGroup>();
        }
        return instanceGroups;
    }
1131450
public java.util.List<ClusterParameterGroup> getParameterGroups() {
        if (parameterGroups == null) {
            parameterGroups = new com.amazonaws.internal.SdkInternalList<ClusterParameterGroup>();
        }
        return parameterGroups;
    }
441410
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder() {

		final List<ManagementGroupVertex> reverseTopologicalSort = new ArrayList<ManagementGroupVertex>();
		final Deque<ManagementGroupVertex> noOutgoingEdges = new ArrayDeque<ManagementGroupVertex>();
		final Map<ManagementGroupVertex, Integer> outdegrees = new HashMap<ManagementGroupVertex, Integer>();

		final Iterator<ManagementGroupVertex> it = new ManagementGroupVertexIterator(this, false, -1);
		while (it.hasNext()) {
			final ManagementGroupVertex groupVertex = it.next();
			outdegrees.put(groupVertex, Integer.valueOf(groupVertex.getNumberOfForwardEdges()));
			if (groupVertex.getNumberOfForwardEdges() == 0) {
				noOutgoingEdges.add(groupVertex);
			}
		}

		while (!noOutgoingEdges.isEmpty()) {

			final ManagementGroupVertex groupVertex = noOutgoingEdges.removeFirst();
			reverseTopologicalSort.add(groupVertex);
			// Decrease indegree of connected vertices
			for (int i = 0; i < groupVertex.getNumberOfBackwardEdges(); i++) {
				final ManagementGroupVertex sourceVertex = groupVertex.getBackwardEdge(i).getSource();
				Integer outdegree = outdegrees.get(sourceVertex);
				outdegree = Integer.valueOf(outdegree.intValue() - 1);
				outdegrees.put(sourceVertex, outdegree);
				if (outdegree.intValue() == 0) {
					noOutgoingEdges.add(sourceVertex);
				}

			}
		}

		return reverseTopologicalSort;
	}
842473
public java.util.List<StaleSecurityGroup> getStaleSecurityGroupSet() {
        if (staleSecurityGroupSet == null) {
            staleSecurityGroupSet = new com.amazonaws.internal.SdkInternalList<StaleSecurityGroup>();
        }
        return staleSecurityGroupSet;
    }
548318
public java.util.List<String> getGroupList() {
        if (groupList == null) {
            groupList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return groupList;
    }
627890
public java.util.List<String> getAdditionalMasterSecurityGroups() {
        if (additionalMasterSecurityGroups == null) {
            additionalMasterSecurityGroups = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return additionalMasterSecurityGroups;
    }
1088463
private function get_groups_all() {
        if (is_null($this->groups)) {
            // NOTE: Performance could be improved here. The system caches user groups
            // in $USER->groupmember[$courseid] => array of groupid=>groupid. Unfortunately this
            // structure does not include grouping information. It probably could be changed to
            // do so, without a significant performance hit on login, thus saving this one query
            // each request.
            $this->groups = groups_get_user_groups($this->course->id, $this->userid);
        }
        return $this->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;
        }
    }