Class ExampleQueryMapper
java.lang.Object
org.springframework.data.redis.repository.query.ExampleQueryMapper
Mapper for Query-by-Example examples to an actual query.
This mapper creates a RedisOperationChain for a given Example considering exact matches,
value transformations and ExampleMatcher.MatchMode for indexed simple and nested type
properties. Map and Collection properties are not considered.
Example matching is limited to case-sensitive and exact matches only.
- Since:
- 2.1
- Author:
- Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionExampleQueryMapper(MappingContext<RedisPersistentEntity<?>, RedisPersistentProperty> mappingContext, IndexResolver indexResolver) -
Method Summary
Modifier and TypeMethodDescriptiongetMappedExample(Example<?> example) Retrieve a mappedRedisOperationChainto query secondary indexes givenExample.
-
Constructor Details
-
ExampleQueryMapper
public ExampleQueryMapper(MappingContext<RedisPersistentEntity<?>, RedisPersistentProperty> mappingContext, IndexResolver indexResolver) - Parameters:
mappingContext- must not be null.indexResolver- must not be null.
-
-
Method Details
-
getMappedExample
Retrieve a mappedRedisOperationChainto query secondary indexes givenExample.- Parameters:
example- must not be null.- Returns:
- the mapped
RedisOperationChain.
-