Connection conn) throws SQLException {
Object res = processDMLWithResults(conn, "SELECT * FROM groups ORDER BY groups_id;");
if (res instanceof Statement) {
Statement statement = (Statement)res;
ResultSet rs = statement.getResultSet();
GroupTreeNode rootNode = new GroupTreeNode(new AllEntriesGroup());
// Create a lookup map for finding the parent to add each group to:
HashMap<String, GroupTreeNode> groups = new HashMap<String, GroupTreeNode>();
LinkedHashMap<GroupTreeNode, String> parentIds = new LinkedHashMap<GroupTreeNode, String>();
while ( rs.next()) {