From 19b5b6b6f0d18eff649ab29563ec3dec1aa85d10 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 13 Aug 2018 15:54:13 +0200 Subject: [PATCH] DATAMONGO-2048 - Polishing. Javadoc tweaks. Original pull request: #595. --- .../core/aggregation/ConvertOperators.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConvertOperators.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConvertOperators.java index 48432a74f..d495639ec 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConvertOperators.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConvertOperators.java @@ -29,7 +29,7 @@ import org.springframework.util.Assert; public class ConvertOperators { /** - * Take the value referenced by given {@literal fieldReference}. + * Take the field referenced by given {@literal fieldReference}. * * @param fieldReference must not be {@literal null}. * @return @@ -39,7 +39,7 @@ public class ConvertOperators { } /** - * Take the value provided by the given {@link AggregationExpression}. + * Take the value resulting from the given {@link AggregationExpression}. * * @param expression must not be {@literal null}. * @return @@ -64,6 +64,7 @@ public class ConvertOperators { public ConvertOperatorFactory(String fieldReference) { Assert.notNull(fieldReference, "FieldReference must not be null!"); + this.fieldReference = fieldReference; this.expression = null; } @@ -76,13 +77,14 @@ public class ConvertOperators { public ConvertOperatorFactory(AggregationExpression expression) { Assert.notNull(expression, "Expression must not be null!"); + this.fieldReference = null; this.expression = expression; } /** * Creates new {@link Convert aggregation expression} that takes the associated value and converts it into the type - * specified by the given identifier.
+ * specified by the given {@code stringTypeIdentifier}.
* NOTE: Requires MongoDB 4.0 or later. * * @param stringTypeIdentifier must not be {@literal null}. @@ -94,7 +96,7 @@ public class ConvertOperators { /** * Creates new {@link Convert aggregation expression} that takes the associated value and converts it into the type - * specified by the given identifier.
+ * specified by the given {@code numericTypeIdentifier}.
* NOTE: Requires MongoDB 4.0 or later. * * @param numericTypeIdentifier must not be {@literal null}. @@ -411,13 +413,13 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toBool} that converts a value to boolean. Shorthand for + * {@link AggregationExpression} for {@code $toBool} that converts a value to {@literal boolean}. Shorthand for * {@link Convert#to(String) Convert#to("bool")}.
* NOTE: Requires MongoDB 4.0 or later. * * @author Christoph Strobl * @see https://docs.mongodb.com/manual/reference/operator/aggregation/toBool/ + * "https://docs.mongodb.com/manual/reference/operator/aggregation/toBool/">https://docs.mongodb.com/manual/reference/operator/aggregation/toBool/ * @since 2.0.10 */ public static class ToBool extends AbstractAggregationExpression { @@ -443,7 +445,7 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toDate} that converts a value to boolean. Shorthand for + * {@link AggregationExpression} for {@code $toDate} that converts a value to {@literal date}. Shorthand for * {@link Convert#to(String) Convert#to("date")}.
* NOTE: Requires MongoDB 4.0 or later. * @@ -475,7 +477,7 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toDecimal} that converts a value to decimal. Shorthand for + * {@link AggregationExpression} for {@code $toDecimal} that converts a value to {@literal decimal}. Shorthand for * {@link Convert#to(String) Convert#to("decimal")}.
* NOTE: Requires MongoDB 4.0 or later. * @@ -507,7 +509,7 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toDouble} that converts a value to double. Shorthand for + * {@link AggregationExpression} for {@code $toDouble} that converts a value to {@literal double}. Shorthand for * {@link Convert#to(String) Convert#to("double")}.
* NOTE: Requires MongoDB 4.0 or later. * @@ -539,7 +541,7 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toInt} that converts a value to integer. Shorthand for + * {@link AggregationExpression} for {@code $toInt} that converts a value to {@literal integer}. Shorthand for * {@link Convert#to(String) Convert#to("int")}.
* NOTE: Requires MongoDB 4.0 or later. * @@ -571,7 +573,7 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toLong} that converts a value to long. Shorthand for + * {@link AggregationExpression} for {@code $toLong} that converts a value to {@literal long}. Shorthand for * {@link Convert#to(String) Convert#to("long")}.
* NOTE: Requires MongoDB 4.0 or later. * @@ -603,7 +605,7 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toObjectId} that converts a value to objectId. Shorthand for + * {@link AggregationExpression} for {@code $toObjectId} that converts a value to {@literal objectId}. Shorthand for * {@link Convert#to(String) Convert#to("objectId")}.
* NOTE: Requires MongoDB 4.0 or later. * @@ -635,7 +637,7 @@ public class ConvertOperators { } /** - * {@link AggregationExpression} for {@code $toString} that converts a value to string. Shorthand for + * {@link AggregationExpression} for {@code $toString} that converts a value to {@literal string}. Shorthand for * {@link Convert#to(String) Convert#to("string")}.
* NOTE: Requires MongoDB 4.0 or later. *