|
24 | 24 | import org.bson.Document;
|
25 | 25 | import org.springframework.data.domain.Sort;
|
26 | 26 | import org.springframework.data.domain.Sort.Direction;
|
| 27 | +import org.springframework.data.mongodb.core.aggregation.ExposedFields.DirectFieldReference; |
27 | 28 | import org.springframework.data.mongodb.core.aggregation.ExposedFields.ExposedField;
|
28 | 29 | import org.springframework.data.mongodb.core.aggregation.ExposedFields.FieldReference;
|
29 |
| -import org.springframework.data.mongodb.core.aggregation.ExposedFields.DirectFieldReference; |
30 |
| -import org.springframework.data.mongodb.core.aggregation.Fields.AggregationField; |
31 | 30 | import org.springframework.data.mongodb.core.aggregation.FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation;
|
| 31 | +import org.springframework.data.mongodb.core.aggregation.Fields.*; |
32 | 32 | import org.springframework.data.mongodb.core.query.Criteria;
|
33 | 33 | import org.springframework.data.mongodb.core.query.CriteriaDefinition;
|
34 | 34 | import org.springframework.data.mongodb.core.query.NearQuery;
|
@@ -394,68 +394,6 @@ public static LookupOperation lookup(Field from, Field localField, Field foreign
|
394 | 394 | return new LookupOperation(from, localField, foreignField, as);
|
395 | 395 | }
|
396 | 396 |
|
397 |
| - /** |
398 |
| - * Creates a new {@link IfNullOperator} for the given {@code field} and {@code replacement} value. |
399 |
| - * |
400 |
| - * @param field must not be {@literal null}. |
401 |
| - * @param replacement must not be {@literal null}. |
402 |
| - * @return never {@literal null}. |
403 |
| - * @since 1.10 |
404 |
| - */ |
405 |
| - public static IfNullOperator ifNull(String field, Object replacement) { |
406 |
| - return IfNullOperator.newBuilder().ifNull(field).thenReplaceWith(replacement); |
407 |
| - } |
408 |
| - |
409 |
| - /** |
410 |
| - * Creates a new {@link IfNullOperator} for the given {@link Field} and {@link Field} to obtain a value from. |
411 |
| - * |
412 |
| - * @param field must not be {@literal null}. |
413 |
| - * @param replacement must not be {@literal null}. |
414 |
| - * @return never {@literal null}. |
415 |
| - * @since 1.10 |
416 |
| - */ |
417 |
| - public static IfNullOperator ifNull(Field field, Field replacement) { |
418 |
| - return IfNullOperator.newBuilder().ifNull(field).thenReplaceWith(replacement); |
419 |
| - } |
420 |
| - |
421 |
| - /** |
422 |
| - * Creates a new {@link IfNullOperator} for the given {@link Field} and {@code replacement} value. |
423 |
| - * |
424 |
| - * @param field must not be {@literal null}. |
425 |
| - * @param replacement must not be {@literal null}. |
426 |
| - * @return never {@literal null}. |
427 |
| - * @since 1.10 |
428 |
| - */ |
429 |
| - public static IfNullOperator ifNull(Field field, Object replacement) { |
430 |
| - return IfNullOperator.newBuilder().ifNull(field).thenReplaceWith(replacement); |
431 |
| - } |
432 |
| - |
433 |
| - /** |
434 |
| - * Creates a new {@link ConditionalOperator} for the given {@link Field} that holds a {@literal boolean} value. |
435 |
| - * |
436 |
| - * @param booleanField must not be {@literal null}. |
437 |
| - * @param then must not be {@literal null}. |
438 |
| - * @param otherwise must not be {@literal null}. |
439 |
| - * @return never {@literal null}. |
440 |
| - * @since 1.10 |
441 |
| - */ |
442 |
| - public static ConditionalOperator conditional(Field booleanField, Object then, Object otherwise) { |
443 |
| - return ConditionalOperator.newBuilder().when(booleanField).then(then).otherwise(otherwise); |
444 |
| - } |
445 |
| - |
446 |
| - /** |
447 |
| - * Creates a new {@link ConditionalOperator} for the given {@link Criteria}. |
448 |
| - * |
449 |
| - * @param criteria must not be {@literal null}. |
450 |
| - * @param then must not be {@literal null}. |
451 |
| - * @param otherwise must not be {@literal null}. |
452 |
| - * @return never {@literal null}. |
453 |
| - * @since 1.10 |
454 |
| - */ |
455 |
| - public static ConditionalOperator conditional(Criteria criteria, Object then, Object otherwise) { |
456 |
| - return ConditionalOperator.newBuilder().when(criteria).then(then).otherwise(otherwise); |
457 |
| - } |
458 |
| - |
459 | 397 | /**
|
460 | 398 | * Creates a new {@link Fields} instance for the given field names.
|
461 | 399 | *
|
|
0 commit comments