Interface ReviewRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Review,Long>, org.springframework.data.repository.Repository<Review,Long>

@Repository public interface ReviewRepository extends org.springframework.data.repository.CrudRepository<Review,Long>
The ReviewRepository is a repository for Review entities
  • Method Summary

    Modifier and Type
    Method
    Description
    findAllByReviewerId(long reviewerId)
    This method returns all Review entities with a given reviewerId.
    This method returns all Review entities with a given moderation status.

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

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
  • Method Details

    • findAllByReviewerId

      Iterable<Review> findAllByReviewerId(long reviewerId)
      This method returns all Review entities with a given reviewerId.
      Parameters:
      reviewerId - id of a reviewer (given in user table)
      Returns:
      all Review entities with a given reviewerId
    • findAllByStatus

      Iterable<Review> findAllByStatus(String status)
      This method returns all Review entities with a given moderation status.
      Parameters:
      status - "Awaiting Approval", "Approved", "Rejected"
      Returns:
      all Review entities with a given status