Class SimpleRedisEnhancedRepository<T,ID>

java.lang.Object
org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
com.redis.om.spring.repository.support.SimpleRedisEnhancedRepository<T,ID>
All Implemented Interfaces:
RedisEnhancedRepository<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 SimpleRedisEnhancedRepository<T,ID> extends org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID> implements RedisEnhancedRepository<T,ID>
  • Field Details

  • Constructor Details

    • SimpleRedisEnhancedRepository

      public SimpleRedisEnhancedRepository(org.springframework.data.repository.core.EntityInformation<T,ID> metadata, org.springframework.data.keyvalue.core.KeyValueOperations operations, @Qualifier("redisModulesOperations") RedisModulesOperations<?> rmo, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMProperties properties)
  • Method Details

    • getIds

      public Iterable<ID> getIds()
      Specified by:
      getIds in interface RedisEnhancedRepository<T,ID>
    • getIds

      public org.springframework.data.domain.Page<ID> getIds(org.springframework.data.domain.Pageable pageable)
      Description copied from interface: RedisEnhancedRepository
      Returns a Page of ids meeting the paging restriction provided in the Pageable object.
      Specified by:
      getIds in interface RedisEnhancedRepository<T,ID>
      Parameters:
      pageable - encapsulates pagination information
      Returns:
      a page of ids
    • updateField

      public void updateField(T entity, MetamodelField<T,?> field, Object value)
      Specified by:
      updateField in interface RedisEnhancedRepository<T,ID>
    • getFieldsByIds

      public <F> Iterable<F> getFieldsByIds(Iterable<ID> ids, MetamodelField<T,F> field)
      Specified by:
      getFieldsByIds in interface RedisEnhancedRepository<T,ID>
    • getExpiration

      public Long getExpiration(ID id)
      Specified by:
      getExpiration in interface RedisEnhancedRepository<T,ID>
    • findAll

      public List<T> findAll()
      Specified by:
      findAll in interface org.springframework.data.repository.CrudRepository<T,ID>
      Specified by:
      findAll in interface org.springframework.data.repository.ListCrudRepository<T,ID>
      Overrides:
      findAll in class org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
    • findAll

      public List<T> findAll(org.springframework.data.domain.Sort sort)
      Specified by:
      findAll in interface org.springframework.data.repository.ListPagingAndSortingRepository<T,ID>
      Specified by:
      findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,ID>
      Overrides:
      findAll in class org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
    • findAll

      public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
      Specified by:
      findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,ID>
      Overrides:
      findAll in class org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
    • saveAll

      public <S extends T> List<S> saveAll(Iterable<S> entities)
      Specified by:
      saveAll in interface org.springframework.data.repository.CrudRepository<T,ID>
      Specified by:
      saveAll in interface org.springframework.data.repository.ListCrudRepository<T,ID>
      Overrides:
      saveAll in class org.springframework.data.keyvalue.repository.support.SimpleKeyValueRepository<T,ID>
    • createKey

      public byte[] createKey(String keyspace, String id)
    • findOne

      public <S extends T> Optional<S> findOne(org.springframework.data.domain.Example<S> example)
      Specified by:
      findOne in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
    • findAll

      public <S extends T> Iterable<S> findAll(org.springframework.data.domain.Example<S> example)
      Specified by:
      findAll in interface org.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:
      findAll in interface org.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:
      findAll in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
    • count

      public <S extends T> long count(org.springframework.data.domain.Example<S> example)
      Specified by:
      count in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>
    • exists

      public <S extends T> boolean exists(org.springframework.data.domain.Example<S> example)
      Specified by:
      exists in interface org.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:
      findBy in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>