Package com.esprit.services.films
Class FilmRatingService
java.lang.Object
com.esprit.services.films.FilmRatingService
- All Implemented Interfaces:
IService<FilmRating>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Connection
private final FilmService
private final UserService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(FilmRating filmRating) void
delete
(FilmRating filmRating) Retrieves the AverageRatingSorted value.double
getAvergeRating
(Long id_film) Retrieves the AvergeRating value.Retrieves the TopRatedFilms value.getUserRatings
(Long userId) Retrieves the UserRatings value.ratingExists
(Long id_film, Long id_user) Performs ratingExists operation.read()
void
update
(FilmRating filmRating)
-
Field Details
-
connection
-
userService
-
filmService
-
-
Constructor Details
-
FilmRatingService
public FilmRatingService()Performs FilmRatingService operation.
-
-
Method Details
-
create
- Specified by:
create
in interfaceIService<FilmRating>
-
read
- Specified by:
read
in interfaceIService<FilmRating>
-
update
- Specified by:
update
in interfaceIService<FilmRating>
-
delete
- Specified by:
delete
in interfaceIService<FilmRating>
-
getAvergeRating
Retrieves the AvergeRating value.- Returns:
- the AvergeRating value
-
getAverageRatingSorted
Retrieves the AverageRatingSorted value.- Returns:
- the AverageRatingSorted value
-
ratingExists
Performs ratingExists operation.- Returns:
- the result of the operation
-
getUserRatings
Retrieves the UserRatings value.- Returns:
- the UserRatings value
-
getTopRatedFilms
Retrieves the TopRatedFilms value.- Returns:
- the TopRatedFilms value
-