return AnnotationTransformations.sortDatasetAnnotatiosn(new HashSet(l));
return AnnotationTransformations.sortDatasetAnnotatiosn( new HashSet<IObject>(l));
	public Map findAnnotations(Class rootNodeType,             @NotNull @Validate(Long.class) Set rootNodeIds,             @Validate(Long.class) Set annotatorIds, Map options) {		        if (rootNodeIds.size()==0)            return new HashMap();		PojoOptions po = new PojoOptions(options);		        Query<List> q = queryFactory.lookup(                PojosFindAnnotationsQueryDefinition.class.getName(),                new Parameters()                    .addIds(rootNodeIds)                    .addClass(rootNodeType)                    .addSet("annotatorIds",annotatorIds)                    .addOptions(po.map()));        List l = iQuery.execute(q);        // no count collection        //        // Destructive changes below this point.        //        for (Object object : l)        {            iQuery.evict(object);            }        // TODO these here or in Query Definition? Does it belong to API or to query?        if (Dataset.class.equals(rootNodeType)){             return AnnotationTransformations.sortDatasetAnnotatiosn(new HashSet(l));        }         else if (Image.class.equals(rootNodeType)){            return AnnotationTransformations.sortImageAnnotatiosn(new HashSet(l));        }        else {             throw new IllegalArgumentException(                    "Class parameter for findAnnotation() must be in " +                    "{Dataset,Image}, not "+ rootNodeType);        }        	}