public static Update updatePojo(Object pojo) {
      Objects.requireNonNull(pojo, "Pojo cannot be null");

      ObjectNode set = JsonNodeFactory.instance.objectNode();
      JsonNode pojoAsJson = JSON.toJsonNode(pojo);
      if (!(pojoAsJson instanceof ObjectNode)) {
        throw new IllegalArgumentException(pojo+" is not a pojo!");
      }
      set.set("$set", pojoAsJson);
      return new Update(set);
    }
public static Update updatePojo ( Object pojo ) { Objects . requireNonNull ( pojo , "Pojo cannot be null" ) ; ObjectNode set = JsonNodeFactory . instance . objectNode ( ) ; JsonNode pojoAsJson = JSON . toJsonNode ( pojo ) ; if ( ! ( pojoAsJson instanceof ObjectNode ) ) { throw new IllegalArgumentException ( pojo + " is not a pojo!" ) ; } set . set ( "$set" , pojoAsJson ) ; return new Update ( set ) ; }
Creates an update like so: $set: toJson(pojo)

@param pojo
@return