/** * Creates an update that adds each of the given values to the array value of the field with the given name, applying the given * options for positioning the pushed values, and then slicing and/or sorting the array. * * @param fieldName the non-null field name * @param values the values * @param options the non-null push options * @param <TItem> the value type * @return the update * @mongodb.driver.manual reference/operator/update/push/ $push */ public static <TItem> Bson pushEach(final String fieldName, final List<TItem> values, final PushOptions options) { return new PushUpdate<TItem>(fieldName, values, options); }
/** * Creates an update that adds each of the given values to the array value of the field with the given name. * * @param fieldName the non-null field name * @param values the values * @param <TItem> the value type * @return the update * @mongodb.driver.manual reference/operator/update/push/ $push */ public static <TItem> Bson pushEach(final String fieldName, final List<TItem> values) { return new PushUpdate<TItem>(fieldName, values, new PushOptions()); }
/** * Creates an update that adds each of the given values to the array value of the field with the given name, applying the given * options for positioning the pushed values, and then slicing and/or sorting the array. * * @param fieldName the non-null field name * @param values the values * @param options the non-null push options * @param <TItem> the value type * @return the update * @mongodb.driver.manual reference/operator/update/push/ $push */ public static <TItem> Bson pushEach(final String fieldName, final List<TItem> values, final PushOptions options) { return new PushUpdate<TItem>(fieldName, values, options); }
/** * Creates an update that adds each of the given values to the array value of the field with the given name. * * @param fieldName the non-null field name * @param values the values * @param <TItem> the value type * @return the update * @mongodb.driver.manual reference/operator/update/push/ $push */ public static <TItem> Bson pushEach(final String fieldName, final List<TItem> values) { return new PushUpdate<TItem>(fieldName, values, new PushOptions()); }