public Set findCGCIHierarchies(Set arg0) {   throw new RuntimeException("implement me");
public Set findCGCIHierarchies(final Set arg0) {  if (null == arg0 || arg0.size() == 0) { return new HashSet(); }  HibernateTemplate ht = new HibernateTemplate(sessions); return (Set) ht.execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException {  newCache();   Query q = session.getNamedQuery("findCGCI"); q.setParameterList("img_list", arg0, new IntegerType());  List result = q.list(); Set imagesAll = new HashSet(result);  if (null == imagesAll || imagesAll.size() == 0) { return new HashSet(); }    Set hierarchies = new HashSet(); Iterator i = imagesAll.iterator(); while (i.hasNext()) { Image img = (Image) i.next(); ImageData id = go(img, false);  Set classifications = img.getClassifications(); Set categories = new HashSet();  for (Iterator c = classifications.iterator(); c.hasNext();) { Classification cla = (Classification) c.next(); if (cla.getValid().booleanValue()) { categories.add(cla.getCategory()); } }  if (categories == null || categories.size() < 1) { hierarchies.add(id); } else { Iterator c = categories.iterator(); while (c.hasNext()) { Category ca = (Category) c.next(); CategoryData cd = go(ca, false);    if (null == cd.images) cd.images = new HashSet(); cd.images.add(id);  Integer cg = ca.getCategoryGroup();   if (cg == null) { hierarchies.add(cd); } else {               }  } } }  emptyCache(); return hierarchies; } });
    public Set findCGCIHierarchies(Set arg0) {        // TODO Auto-generated method stub        /* return null; */        throw new RuntimeException("implement me");    }