return HierarchyTransformations.invertPDI(new HashSet(l));
return HierarchyTransformations.invertPDI(new HashSet<IObject>(l));
	public Set findContainerHierarchies(@NotNull Class rootNodeType,             @NotNull @Validate(Long.class) Set imageIds, Map options) {				PojoOptions po = new PojoOptions(options);                Query q = queryFactory.lookup(                PojosFindHierarchiesQueryDefinition.class.getName(),                new Parameters()                    .addClass(rootNodeType)                    .addIds(imageIds)                    .addOptions(po.map()));        List l = (List) iQuery.execute(q);        collectCounts(l,po);        //        // Destructive changes below this point.        //        for (Object object : l)        {            iQuery.evict(object);            }        // TODO; this if-else statement could be removed if Transformations         // did their own dispatching         // TODO: logging, null checking. daos should never return null         // TODO then size!		if (Project.class.equals(rootNodeType)) {			if (imageIds.size()==0){				return new HashSet();			}            			return HierarchyTransformations.invertPDI(new HashSet(l)); 					}		else if (CategoryGroup.class.equals(rootNodeType)){			if (imageIds.size()==0){				return new HashSet();			}						return HierarchyTransformations.invertCGCI(new HashSet(l)); 		}				else {throw new IllegalArgumentException( // TODO refactor. move this up.	                "Class parameter for findContainerHierarchies() must be" +                    " in {Project,CategoryGroup}, not " + rootNodeType);		}			}