/** * Perform a bitwise or on the given field * * @param field The field to perform the or on * @param value The value * @return this object */ public static Builder bitwiseOr(String field, int value) { return new Builder().bitwiseOr(field, value); }
/** * Perform a bit operation on the given field * * @param field The field to perform the operation on * @param operation The operation to perform * @param value The value * @return this object */ public static Builder bit(String field, String operation, int value) { return new Builder().bit(field, operation, value); }
/** * Rename the given field to the new field name * * @param oldFieldName The old field name * @param newFieldName The new field name * @return this object */ public static Builder rename(String oldFieldName, String newFieldName) { return new Builder().rename(oldFieldName, newFieldName); }
/** * Remove all occurances of value from the array at field * * @param field The field to remove the value from * @param value The value to remove. This may be another query. * @return this object */ public static Builder pull(String field, Object value) { return new Builder().pull(field, value); }
/** * Add the given values to the array value if they don't already exist in the specified field atomically * * @param field The field to add the values to * @param values The values to add * @return this object */ public static Builder addToSet(String field, List<?> values) { return new Builder().addToSet(field, values); }
/** * Perform a bitwise and on the given field * * @param field The field to perform the and on * @param value The value * @return this object */ public static Builder bitwiseAnd(String field, int value) { return new Builder().bitwiseAnd(field, value); }
/** * Remove all occurances of the values from the array at field * * @param field The field to remove the values from * @param values The values to remove * @return this object */ public static Builder pullAll(String field, Object... values) { return new Builder().pullAll(field, values); }
/** * Remove the last value from the array specified by field atomically * * @param field The field to remove the value from * @return this object */ public static Builder popLast(String field) { return new Builder().popLast(field); }
/** * Remove the first value from the array specified by field atomically * * @param field The field to remove the value from * @return this object */ public static Builder popFirst(String field) { return new Builder().popFirst(field); }
/** * Add the given values to the array value if they don't already exist in the specified field atomically * * @param field The field to add the values to * @param values The values to add * @return this object */ public static Builder addToSet(String field, Object... values) { return new Builder().addToSet(field, values); }
/** * Add the given value to the array value if it doesn't already exist in the specified field atomically * * @param field The field to add the value to * @param value The value to add * @return this object */ public static Builder addToSet(String field, Object value) { return new Builder().addToSet(field, value); }
/** * Add the given value to the array value at the specified field atomically * * @param field The field to add the value to * @param value The value to add * @return this object */ public static Builder push(String field, Object value) { return new Builder().push(field, value); }
/** * Unset the given field atomically * * @param field The field to unset * @return this object */ public static Builder unset(String field) { return new Builder().unset(field); }
/** * Set the given field (can be multiple levels deep) to the given value atomically * * @param field The field to set * @param value The value to set it to * @return this object */ public static Builder set(String field, Object value) { return new Builder().set(field, value); }
/** * Remove all occurances of the values from the array at field * * @param field The field to remove the values from * @param values The values to remove * @return this object */ public static Builder pullAll(String field, List<?> values) { return new Builder().pullAll(field, values); }
/** * Remove all occurances of the values from the array at field * * @param field The field to remove the values from * @param values The values to remove * @return this object */ public static Builder pullAll(String field, Object... values) { return new Builder().pullAll(field, values); }
/** * Remove all occurances of value from the array at field * * @param field The field to remove the value from * @param value The value to remove. This may be another query. * @return this object */ public static Builder pull(String field, Object value) { return new Builder().pull(field, value); }
/** * Unset the given field atomically * * @param field The field to unset * @return this object */ public static Builder unset(String field) { return new Builder().unset(field); }
/** * Add all of the given values to the array value at the specified field atomically * * @param field The field to add the values to * @param values The values to add * @return this object */ public static Builder pushAll(String field, List<?> values) { return new Builder().pushAll(field, values); }
/** * Increment the given field atomically by the given value * * @param field The field to increment * @param by The value to increment by * @return this object */ public static Builder inc(String field, int by) { return new Builder().inc(field, by); }