334335336337338339340341
* @param by * The value to increment by * @return this object */ public Builder inc(String field, int by) { return addOperation("$inc", field, new SingleUpdateOperationValue( false, false, by)); }
349350351352353354355356
* @param value * The value to set it to * @return this object */ public Builder set(String field, Object value) { return addOperation("$set", field, new SingleUpdateOperationValue( false, true, value)); }
362363364365366367368
* The field to unset * @return this object */ public Builder unset(String field) { return addOperation("$unset", field, new SingleUpdateOperationValue(false, false, 1)); }
376377378379380381382383
* @param value * The value to add * @return this object */ public Builder push(String field, Object value) { return addOperation("$push", field, new SingleUpdateOperationValue( true, true, value)); }
422423424425426427428
* The value to add * @return this object */ public Builder addToSet(String field, Object value) { return addOperation("$addToSet", field, new SingleUpdateOperationValue(true, true, value)); }
463464465466467468469470
* @param field * The field to remove the value from * @return this object */ public Builder popFirst(String field) { return addOperation("$pop", field, new SingleUpdateOperationValue( true, false, -1)); }
475476477478479480481482
* @param field * The field to remove the value from * @return this object */ public Builder popLast(String field) { return addOperation("$pop", field, new SingleUpdateOperationValue( true, false, 1)); }
489490491492493494495496
* @param value * The value to remove. This may be another query. * @return this object */ public Builder pull(String field, Object value) { return addOperation("$pull", field, new SingleUpdateOperationValue( true, true, value)); }
532533534535536537538
* The new field name * @return this object */ public Builder rename(String oldFieldName, String newFieldName) { return addOperation("$rename", oldFieldName, new SingleUpdateOperationValue(false, false, newFieldName)); }
614615616617618619620621
* @param value * The value to set * @return this object */ public Builder addRawOperation(String op, String field, Object value) { return addOperation(op, field, new SingleUpdateOperationValue( false, false, value)); }