PagingAndSortingRepositoryインタフェース

NosqlRepositoryインタフェースでは、PagingAndSortingRepositoryインタフェースを拡張します。

PagingAndSortingRepositoryインタフェースにより、CrudRepositoryインタフェースが拡張され、次のようなメソッドが提供されます。

  • Page<T> findAll(Pageable pageable)
  • Iterable<T> findAll(Sort sort)
  • long count()
  • void delete(T entity)
  • void deleteAll()
  • void deleteAll(Iterable<? extends T> entities)
  • void deleteAllById(Iterable<? extends ID> ids)
  • void deleteById(ID id)
  • boolean existsById(ID id)
  • Iterable<T> findAll()
  • Iterable<T> findAllById(Iterable<ID> ids)
  • Optional<T> findById(ID id)
  • <S extends T> S save(S entity)
  • <S extends T> Iterable<S> saveAll(Iterable<S> entities)

これらのメソッドは、どれも必要な機能に使用できます。

SpringのPagingAndSortingRepositoryインタフェースの詳細は、PagingAndSortingRepositoryを参照してください。