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