code: 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();
      }
docs: Returns an <code>Iterator</code> over the <code>Collection</code> of <code>IEntityGroups
  </code> that the <code>IEntity</code> belongs to.
  
  @return java.util.Iterator
  @param ent org.apereo.portal.groups.IEntityGroup