core/src/main/java/com/orientechnologies/orient/core/db/record/ridbag/ORidBag.java
private void replaceWithSBTree(OBonsaiCollectionPointer pointer) {
    delegate.requestDelete();
    final OSBTreeRidBag treeBag = new OSBTreeRidBag();
    treeBag.setCollectionPointer(pointer);
    treeBag.setOwner(delegate.getOwner());
    for (OMultiValueChangeListener<OIdentifiable, OIdentifiable> listener : delegate.getChangeListeners())
      treeBag.addChangeListener(listener);
    delegate = treeBag;
  }
private void replaceWithSBTree(OBonsaiCollectionPointer pointer) {
    delegate.requestDelete();
    final OSBTreeRidBag treeBag = new OSBTreeRidBag();
    treeBag.setCollectionPointer(pointer);
    treeBag.setOwner(delegate.getOwner());
    for (OMultiValueChangeListener<OIdentifiable, OIdentifiable> listener : delegate.getChangeListeners())
      treeBag.addChangeListener(listener);
    delegate = treeBag;
  }
Silently replace delegate by tree implementation.

@param pointer new collection pointer