Criteria c = CategoryMapper.buildBasicCriteria(data.getID());
UserCredentials uc = (UserCredentials) registry.lookup(LookupNames.USER_CREDENTIALS); Criteria c = CategoryMapper.buildBasicCriteria(data.getID(), uc.getUserID());
    public void updateCategoryGroup(CategoryGroupData data, List toAdd)        throws DSOutOfServiceException, DSAccessException    {        Criteria c = CategoryMapper.buildBasicCriteria(data.getID());        CategoryGroup cg =             (CategoryGroup) gateway.retrieveSTSData("CategoryGroup", c);        cg.setName(data.getName());        cg.setDescription(data.getDescription());        List l = new ArrayList();        l.add(cg);        gateway.updateAttributes(l);        /* Need to discuss the semantic of the operation        //Prepare the categories to add or remove.        List categories = data.getCategories();           CategorySummary cs;            if (toAdd != null) {            Iterator j = toAdd.iterator();            while (j.hasNext()) {                cs = (CategorySummary) j.next();                if (!categories.contains(cs)) categories.add(cs);            }        }        Iterator k = categories.iterator();        List newSelection = new ArrayList();        while (k.hasNext()) {            cs = (CategorySummary) k.next();            c = CategoryMapper.buildBasicCriteria(cs.getID());            newSelection.add(gateway.retrieveSTSData("Category", c));        }        */    }