if (rootNodeType.equals(CategoryGroup.class)){ return AdapterUtils.go((CategoryGroup) result); } else if (rootNodeType.equals(Category.class)){ return AdapterUtils.go((Category) result); } else { throw new IllegalArgumentException("Method only takes CategoryGroup and Category as argument."); }
return AdapterUtils.adaptLoadedCGCIHierarchy(rootNodeType,result);
    public DataObject loadCGCIHierarchy(Class rootNodeType, int rootNodeID) {            Object result = proxiedInterface.loadCGCIHierarchy(rootNodeType, rootNodeID);        if (rootNodeType.equals(CategoryGroup.class)){            return AdapterUtils.go((CategoryGroup) result);        } else if (rootNodeType.equals(Category.class)){            return AdapterUtils.go((Category) result);        } else {            throw new IllegalArgumentException("Method only takes CategoryGroup and Category as argument.");        }    }