Polishing.

Tweak Javadoc. Add since tag, reformat code. Simplify tests. Move documentation bits into the right place.

See #3726.
Original pull request: #3765.
This commit is contained in:
Mark Paluch
2021-08-27 09:34:40 +02:00
parent 62eb719b1e
commit f662d7ca0d
4 changed files with 21 additions and 19 deletions

View File

@@ -281,10 +281,6 @@ lower / upper bounds (`$gt` / `$gte` & `$lt` / `$lte`) according to `Range`
| `Exists`
| `findByLocationExists(boolean exists)`
| `{"location" : {"$exists" : exists }}`
| `SampleRate`
| `sampleRate(double sampleRate)`
| `{"$sampleRate" : sampleRate }`
|===
NOTE: If the property criterion compares a document, the order of the fields and exact equality in the document matters.

View File

@@ -1219,6 +1219,7 @@ The `Criteria` class provides the following methods, all of which correspond to
* `Criteria` *orOperator* `(Criteria... criteria)` Creates an or query using the `$or` operator for all of the provided criteria
* `Criteria` *orOperator* `(Collection<Criteria> criteria)` Creates an or query using the `$or` operator for all of the provided criteria
* `Criteria` *regex* `(String re)` Creates a criterion using a `$regex`
* `Criteria` *sampleRate* `(double sampleRate)` Creates a criterion using the `$sampleRate` operator
* `Criteria` *size* `(int s)` Creates a criterion using the `$size` operator
* `Criteria` *type* `(int t)` Creates a criterion using the `$type` operator
* `Criteria` *matchingDocumentStructure* `(MongoJsonSchema schema)` Creates a criterion using the `$jsonSchema` operator for <<mongo.jsonSchema,JSON schema criteria>>. `$jsonSchema` can only be applied on the top level of a query and not property specific. Use the `properties` attribute of the schema to match against nested fields.