code: public void setParentGroup(CmsDbContext dbc, String groupName, String parentGroupName)
      throws CmsException, CmsDataAccessException {
  
          CmsGroup group = readGroup(dbc, groupName);
          CmsUUID parentGroupId = CmsUUID.getNullUUID();
  
          // if the group exists, use its id, else set to unknown.
          if (parentGroupName != null) {
              parentGroupId = readGroup(dbc, parentGroupName).getId();
          }
  
          group.setParentId(parentGroupId);
  
          // write the changes to the cms
          writeGroup(dbc, group);
      }
docs: Sets a new parent group for an already existing group.<p>
  
  @param dbc the current database context
  @param groupName the name of the group that should be written
  @param parentGroupName the name of the parent group to set,
  or <code>null</code> if the parent
  group should be deleted.
  
  @throws CmsException if operation was not successful
  @throws CmsDataAccessException if the group with <code>groupName</code> could not be read from VFS