docs: @Override
      public DBObject getUpdateClause() {
          if (clear) {
              // If new items were added, they'll be placed on the updateList.  Either way We use $set to ensure old
              // values are removed from the underlying store.
              BasicDBList updateList = new BasicDBList();
              updateList.addAll(updates);
  
              return new BasicDBObject($set.name(), new BasicDBObject(getNameFromPrefix(),  updateList));
          } else {
              if (updates.isEmpty()) {
                  return new BasicDBObject();     // If there are no updates, return an empty DBObject
              } else {
                  BasicDBList updateList = new BasicDBList();
                  updateList.addAll(updates);
                  
                  if (operation.equals($addToSet)) {
                      return new BasicDBObject($addToSet.name(), new BasicDBObject(getNameFromPrefix(), new BasicDBObject(EACH, updateList)));
                  } else {
                      return new BasicDBObject(operation.name(), new BasicDBObject(getNameFromPrefix(), updateList));
                  }
              }
          }
      }