code: @Override
    public ODocument toStream() {
      acquireExclusiveLock();
      try {
        document.setInternalStatus(ORecordElement.STATUS.UNMARSHALLING);
  
        try {
          final ORecordTrackedSet idxs = new ORecordTrackedSet(document);
  
          for (final OIndexInternal<?> i : indexes.values()) {
            idxs.add(i.updateConfiguration());
          }
          document.field(CONFIG_INDEXES, idxs, OType.EMBEDDEDSET);
  
        } finally {
          document.setInternalStatus(ORecordElement.STATUS.LOADED);
        }
        document.setDirty();
  
        return document;
      } finally {
        releaseExclusiveLock();
      }
    }
docs: Binds POJO to ODocument.