BTree tree = null;
if (recid != 0) {
tree = BTree.load(manager, recid);
}
else {
Comparator comparator = new DefaultComparator();
//Comparator comparator = new ObjectBAComparator(new DefaultComparator());
tree = BTree.createInstance(manager, comparator);
manager.setNamedObject(name, tree.getRecid());
}
return tree;