Class SimpleRedisDocumentRepository<T,ID>
java.lang.Object
org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
com.redis.om.spring.repository.support.SimpleRedisDocumentRepository<T,ID>
- All Implemented Interfaces:
RedisDocumentRepository<T,,ID> org.springframework.data.keyvalue.repository.KeyValueRepository<T,,ID> org.springframework.data.repository.CrudRepository<T,,ID> org.springframework.data.repository.ListCrudRepository<T,,ID> org.springframework.data.repository.ListPagingAndSortingRepository<T,,ID> org.springframework.data.repository.PagingAndSortingRepository<T,,ID> org.springframework.data.repository.query.QueryByExampleExecutor<T>,org.springframework.data.repository.Repository<T,ID>
public class SimpleRedisDocumentRepository<T,ID>
extends org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
implements RedisDocumentRepository<T,ID>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EntityAuditorprotected final Embedderprotected final RediSearchIndexerprotected final MappingRedisOMConverterprotected final RedisModulesOperations<String> protected final org.springframework.data.keyvalue.core.KeyValueOperations -
Constructor Summary
ConstructorsConstructorDescriptionSimpleRedisDocumentRepository(org.springframework.data.repository.core.EntityInformation<T, ID> metadata, org.springframework.data.keyvalue.core.KeyValueOperations operations, RedisModulesOperations<?> rmo, RediSearchIndexer indexer, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, com.google.gson.GsonBuilder gsonBuilder, Embedder embedder, RedisOMProperties properties) -
Method Summary
Modifier and TypeMethodDescription<S extends T>
longcount(org.springframework.data.domain.Example<S> example) byte[]voidvoiddeleteById(ID id, redis.clients.jedis.json.Path2 path) <S extends T>
booleanexists(org.springframework.data.domain.Example<S> example) findAll(org.springframework.data.domain.Example<S> example) <S extends T>
org.springframework.data.domain.Page<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable) findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort) org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable) findAll(org.springframework.data.domain.Sort sort) findAllById(Iterable<ID> ids) <S extends T,R>
RfindBy(org.springframework.data.domain.Example<S> example, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) findOne(org.springframework.data.domain.Example<S> example) getExpiration(ID id) <F> Iterable<F> getFieldsByIds(Iterable<ID> ids, MetamodelField<T, F> field) getIds()org.springframework.data.domain.Page<ID> getIds(org.springframework.data.domain.Pageable pageable) Returns aPageof ids meeting the paging restriction provided in thePageableobject.booleansetExpiration(ID id, Long expiration, TimeUnit timeUnit) <S extends T>
Supdate(org.springframework.data.domain.Example<S> example) <S extends T>
Supdate(S entity) <S extends T>
voidvoidupdateField(T entity, MetamodelField<T, ?> field, Object value) Methods inherited from class org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository
count, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findById, saveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.repository.CrudRepository
count, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll
-
Field Details
-
modulesOperations
-
metadata
-
operations
protected final org.springframework.data.keyvalue.core.KeyValueOperations operations -
indexer
-
mappingConverter
-
auditor
-
embedder
-
-
Constructor Details
-
SimpleRedisDocumentRepository
public SimpleRedisDocumentRepository(org.springframework.data.repository.core.EntityInformation<T, ID> metadata, org.springframework.data.keyvalue.core.KeyValueOperations operations, @Qualifier("redisModulesOperations") RedisModulesOperations<?> rmo, RediSearchIndexer indexer, org.springframework.data.redis.core.mapping.RedisMappingContext mappingContext, com.google.gson.GsonBuilder gsonBuilder, Embedder embedder, RedisOMProperties properties)
-
-
Method Details
-
getIds
- Specified by:
getIdsin interfaceRedisDocumentRepository<T,ID>
-
getIds
public org.springframework.data.domain.Page<ID> getIds(org.springframework.data.domain.Pageable pageable) Description copied from interface:RedisDocumentRepositoryReturns aPageof ids meeting the paging restriction provided in thePageableobject.- Specified by:
getIdsin interfaceRedisDocumentRepository<T,ID> - Parameters:
pageable- encapsulates pagination information- Returns:
- a page of ids
-
deleteById
- Specified by:
deleteByIdin interfaceRedisDocumentRepository<T,ID>
-
updateField
- Specified by:
updateFieldin interfaceRedisDocumentRepository<T,ID>
-
getFieldsByIds
- Specified by:
getFieldsByIdsin interfaceRedisDocumentRepository<T,ID>
-
getExpiration
- Specified by:
getExpirationin interfaceRedisDocumentRepository<T,ID>
-
setExpiration
- Specified by:
setExpirationin interfaceRedisDocumentRepository<T,ID>
-
saveAll
-
bulkLoad
- Specified by:
bulkLoadin interfaceRedisDocumentRepository<T,ID> - Throws:
IOException
-
update
- Specified by:
updatein interfaceRedisDocumentRepository<T,ID>
-
delete
-
findAllById
- Specified by:
findAllByIdin interfaceorg.springframework.data.repository.CrudRepository<T,ID> - Specified by:
findAllByIdin interfaceorg.springframework.data.repository.ListCrudRepository<T,ID> - Overrides:
findAllByIdin classorg.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
-
getKeyspace
- Specified by:
getKeyspacein interfaceRedisDocumentRepository<T,ID>
-
createKey
-
findOne
- Specified by:
findOnein interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
public <S extends T> Iterable<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort) - Specified by:
findAllin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
public <S extends T> org.springframework.data.domain.Page<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable) - Specified by:
findAllin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable) -
findAll
- Specified by:
findAllin interfaceorg.springframework.data.repository.ListPagingAndSortingRepository<T,ID> - Specified by:
findAllin interfaceorg.springframework.data.repository.PagingAndSortingRepository<T,ID> - Overrides:
findAllin classorg.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
-
count
- Specified by:
countin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
exists
- Specified by:
existsin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findBy
public <S extends T,R> R findBy(org.springframework.data.domain.Example<S> example, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) - Specified by:
findByin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
update
- Specified by:
updatein interfaceRedisDocumentRepository<T,ID>
-
updateAll
- Specified by:
updateAllin interfaceRedisDocumentRepository<T,ID>
-