public class QueryByExampleRedisExecutor<T> extends Object implements org.springframework.data.repository.query.QueryByExampleExecutor<T>, BeanFactoryAware, BeanClassLoaderAware
Query-by-Example
operations.
This executor uses ExampleQueryMapper
to map Example
s into KeyValueQuery
to execute its query
methods.
Constructor and Description |
---|
QueryByExampleRedisExecutor(org.springframework.data.repository.core.EntityInformation<T,?> entityInformation,
RedisKeyValueTemplate keyValueTemplate)
|
QueryByExampleRedisExecutor(org.springframework.data.repository.core.EntityInformation<T,?> entityInformation,
RedisKeyValueTemplate keyValueTemplate,
IndexResolver indexResolver)
|
Modifier and Type | Method and Description |
---|---|
<S extends T> |
count(org.springframework.data.domain.Example<S> example) |
<S extends T> |
exists(org.springframework.data.domain.Example<S> example) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example,
org.springframework.data.domain.Pageable pageable) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example,
org.springframework.data.domain.Sort sort) |
<S extends T,R> |
findBy(org.springframework.data.domain.Example<S> example,
Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>,R> queryFunction) |
<S extends T> |
findOne(org.springframework.data.domain.Example<S> example) |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanFactory(BeanFactory beanFactory) |
public QueryByExampleRedisExecutor(org.springframework.data.repository.core.EntityInformation<T,?> entityInformation, RedisKeyValueTemplate keyValueTemplate)
QueryByExampleRedisExecutor
given EntityInformation
and RedisKeyValueTemplate
.
This constructor uses the configured IndexResolver
from the converter.entityInformation
- must not be null.keyValueTemplate
- must not be null.public QueryByExampleRedisExecutor(org.springframework.data.repository.core.EntityInformation<T,?> entityInformation, RedisKeyValueTemplate keyValueTemplate, IndexResolver indexResolver)
entityInformation
- must not be null.keyValueTemplate
- must not be null.public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
public <S extends T> Optional<S> findOne(org.springframework.data.domain.Example<S> example)
findOne
in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
public <S extends T> Iterable<S> findAll(org.springframework.data.domain.Example<S> example)
findAll
in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
public <S extends T> Iterable<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort)
findAll
in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
public <S extends T> org.springframework.data.domain.Page<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable)
findAll
in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
public <S extends T> long count(org.springframework.data.domain.Example<S> example)
count
in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
public <S extends T> boolean exists(org.springframework.data.domain.Example<S> example)
exists
in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.