BsonDocument getNextVersion() {
    if (!this.hasVersion() || this.getVersionDoc() == null) {
      return getFreshVersionDocument();
    }
    final BsonDocument nextVersion = BsonUtils.copyOfDocument(this.getVersionDoc());
    nextVersion.put(
            Fields.VERSION_COUNTER_FIELD,
            new BsonInt64(this.getVersion().getVersionCounter() + 1));
    return nextVersion;
  }
BsonDocument getNextVersion ( ) { if ( ! this . hasVersion ( ) || this . getVersionDoc ( ) == null ) { return getFreshVersionDocument ( ) ; } final BsonDocument nextVersion = BsonUtils . copyOfDocument ( this . getVersionDoc ( ) ) ; nextVersion . put ( Fields . VERSION_COUNTER_FIELD , new BsonInt64 ( this . getVersion ( ) . getVersionCounter ( ) + 1 ) ) ; return nextVersion ; }
Given a DocumentVersionInfo, returns a BSON document representing the next version. This means
and incremented version count for a non-empty version, or a fresh version document for an
empty version.
@return a BsonDocument representing a synchronization version