public Node getNode(String name) { Collection nodes = manager.getAllQueries(); for (Iterator iter = nodes.iterator(); iter.hasNext(); ) { Query node = (Query) iter.next(); if (node.getName().equals(name)) { return node; } } return null; }
public void updateNode(Object node) throws EntityExistException { Query db = (Query) node; manager.updateQuery(db.getId(), db.getName(), db.getDescription()); }
public void moveNode(int parentId, int id, int position) { manager.moveQuery(id, parentId); }
public Collection getAllNodes() { return manager.getAllQueries(); }
public void deleteNode(int id) { manager.deleteQuery(id); }
public Node getNode(int id) { return manager.getQuery(id); }
public void addNode(Object node) throws EntityExistException { Query query = (Query) node; manager.addQuery(query.getPid(), query.getName(), query.getDescription(), query.getIsLeaf()); }
public void copyNode(Object node) throws EntityExistException { Query query = (Query) node; manager.copyQuery(query.getId(), query.getName(), query.getDescription()); }