Interface SubscriptionRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Subscription,String>, org.springframework.data.jpa.repository.JpaRepository<Subscription,String>, org.springframework.data.repository.PagingAndSortingRepository<Subscription,String>, org.springframework.data.repository.query.QueryByExampleExecutor<Subscription>, org.springframework.data.repository.Repository<Subscription,String>

@Repository public interface SubscriptionRepository extends org.springframework.data.jpa.repository.JpaRepository<Subscription,String>
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
     
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findOne
  • Method Details

    • findByTopic

      Iterable<Subscription> findByTopic(String topic)
    • findBySubscriber

      Iterable<Subscription> findBySubscriber(String email)
    • countSubscribers

      @Query(value="select count(distinct subscriber) from subscriptions", nativeQuery=true) long countSubscribers()