Class FilmRatingService

java.lang.Object
com.esprit.services.films.FilmRatingService
All Implemented Interfaces:
IService<FilmRating>

public class FilmRatingService extends Object implements IService<FilmRating>
  • Field Details

  • Constructor Details

    • FilmRatingService

      public FilmRatingService()
      Performs FilmRatingService operation.
  • Method Details

    • create

      public void create(FilmRating filmRating)
      Specified by:
      create in interface IService<FilmRating>
    • read

      public List<FilmRating> read()
      Specified by:
      read in interface IService<FilmRating>
    • update

      public void update(FilmRating filmRating)
      Specified by:
      update in interface IService<FilmRating>
    • delete

      public void delete(FilmRating filmRating)
      Specified by:
      delete in interface IService<FilmRating>
    • getAvergeRating

      public double getAvergeRating(Long id_film)
      Retrieves the AvergeRating value.
      Returns:
      the AvergeRating value
    • getAverageRatingSorted

      public List<FilmRating> getAverageRatingSorted()
      Retrieves the AverageRatingSorted value.
      Returns:
      the AverageRatingSorted value
    • ratingExists

      public FilmRating ratingExists(Long id_film, Long id_user)
      Performs ratingExists operation.
      Returns:
      the result of the operation
    • getUserRatings

      public List<FilmRating> getUserRatings(Long userId)
      Retrieves the UserRatings value.
      Returns:
      the UserRatings value
    • getTopRatedFilms

      public List<FilmRating> getTopRatedFilms()
      Retrieves the TopRatedFilms value.
      Returns:
      the TopRatedFilms value