@Override
 public OMVRBTreeEntry<K, V> getRight() {
   if (dataProvider == null) return null;
   if (right == null && dataProvider.getRight().isValid()) {
     // LAZY LOADING OF THE RIGHT LEAF
     right = pTree.loadEntry(this, dataProvider.getRight());
     checkEntryStructure();
   }
   return right;
 }
  public void checkEntryStructure() {
    if (!tree.isRuntimeCheckEnabled()) return;

    if (dataProvider.getParent() == null)
      OLogManager.instance()
          .error(this, "checkEntryStructure: Node %s has parentRid null!\n", this);
    if (dataProvider.getLeft() == null)
      OLogManager.instance().error(this, "checkEntryStructure: Node %s has leftRid null!\n", this);
    if (dataProvider.getRight() == null)
      OLogManager.instance().error(this, "checkEntryStructure: Node %s has rightRid null!\n", this);

    if (this == left
        || dataProvider.getIdentity().isValid()
            && dataProvider.getIdentity().equals(dataProvider.getLeft()))
      OLogManager.instance()
          .error(this, "checkEntryStructure: Node %s has left that points to itself!\n", this);
    if (this == right
        || dataProvider.getIdentity().isValid()
            && dataProvider.getIdentity().equals(dataProvider.getRight()))
      OLogManager.instance()
          .error(this, "checkEntryStructure: Node %s has right that points to itself!\n", this);
    if (left != null && left == right)
      OLogManager.instance()
          .error(this, "checkEntryStructure: Node %s has left and right equals!\n", this);

    if (left != null) {
      if (!left.dataProvider.getIdentity().equals(dataProvider.getLeft()))
        OLogManager.instance()
            .error(this, "checkEntryStructure: Wrong left node loaded: " + dataProvider.getLeft());
      if (left.parent != this)
        OLogManager.instance()
            .error(
                this,
                "checkEntryStructure: Left node is not correctly connected to the parent"
                    + dataProvider.getLeft());
    }

    if (right != null) {
      if (!right.dataProvider.getIdentity().equals(dataProvider.getRight()))
        OLogManager.instance()
            .error(
                this, "checkEntryStructure: Wrong right node loaded: " + dataProvider.getRight());
      if (right.parent != this)
        OLogManager.instance()
            .error(
                this,
                "checkEntryStructure: Right node is not correctly connected to the parent"
                    + dataProvider.getRight());
    }
  }