You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java
+3-20
Original file line number
Diff line number
Diff line change
@@ -237,10 +237,11 @@ public Optional<String> getComment() {
237
237
}
238
238
239
239
/**
240
-
* Get the hint used to to fulfill the aggregation.
240
+
* Get the hint used to fulfill the aggregation.
241
241
*
242
242
* @return never {@literal null}.
243
243
* @since 3.1
244
+
* @deprecated since 4.1, use {@link #getHintObject()} instead.
244
245
*/
245
246
publicOptional<Document> getHint() {
246
247
returnhint.map(it -> {
@@ -257,25 +258,7 @@ public Optional<Document> getHint() {
257
258
}
258
259
259
260
/**
260
-
* Get the hint (indexName) used to to fulfill the aggregation.
261
-
*
262
-
* @return never {@literal null}.
263
-
* @since 4.1
264
-
*/
265
-
publicOptional<String> getHintAsString() {
266
-
returnhint.map(it -> {
267
-
if (itinstanceofStringhintString) {
268
-
returnhintString;
269
-
}
270
-
if (itinstanceofDocumentdoc) {
271
-
returnBsonUtils.toJson(doc);
272
-
}
273
-
thrownewIllegalStateException("Unable to read hint of type %s".formatted(it.getClass()));
274
-
});
275
-
}
276
-
277
-
/**
278
-
* Get the hint used to to fulfill the aggregation.
Copy file name to clipboardExpand all lines: spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/AggregationOptionsTests.java
0 commit comments