Class MongoExampleMapper
java.lang.Object
org.springframework.data.mongodb.core.convert.MongoExampleMapper
Mapper from
Example to a query Document.- Since:
- 1.8
- Author:
- Christoph Strobl, Mark Paluch, Jens Schauder
- See Also:
-
ExampleExampleMatcherUntypedExampleMatcher
-
Constructor Summary
ConstructorsConstructorDescriptionMongoExampleMapper(MongoConverter converter) Create a newMongoTypeMappergivenMongoConverter. -
Method Summary
Modifier and TypeMethodDescriptionorg.bson.DocumentgetMappedExample(org.springframework.data.domain.Example<?> example) Returns the givenExampleasDocumentholding matching values extracted fromExample.getProbe().org.bson.DocumentgetMappedExample(org.springframework.data.domain.Example<?> example, MongoPersistentEntity<?> entity) Returns the givenExampleasDocumentholding matching values extracted fromExample.getProbe().
-
Constructor Details
-
MongoExampleMapper
Create a newMongoTypeMappergivenMongoConverter.- Parameters:
converter- must not be null.
-
-
Method Details
-
getMappedExample
public org.bson.Document getMappedExample(org.springframework.data.domain.Example<?> example) Returns the givenExampleasDocumentholding matching values extracted fromExample.getProbe().- Parameters:
example- must not be null.- Returns:
-
getMappedExample
public org.bson.Document getMappedExample(org.springframework.data.domain.Example<?> example, MongoPersistentEntity<?> entity) Returns the givenExampleasDocumentholding matching values extracted fromExample.getProbe().- Parameters:
example- must not be null.entity- must not be null.- Returns:
-