Package com.esprit.services.cinemas
Class CinemaRatingService
java.lang.Object
com.esprit.services.cinemas.CinemaRatingService
- All Implemented Interfaces:
IService<CinemaRating>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CinemaService
private final Connection
private final UserService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate CinemaComment
private CinemaRating
void
create
(CinemaRating cinemaRating) void
delete
(CinemaRating cinemaRating) private void
deleteByClientAndCinema
(Long clientId, Long cinemaId) getAverageRating
(Long cinemaId) Retrieves the AverageRating value.getCommentsByCinemaId
(Long cinemaId) Retrieves the CommentsByCinemaId value.getRatingForClientAndCinema
(Long clientId, Long cinemaId) Retrieves the RatingForClientAndCinema value.Retrieves the TopRatedCinemas value.read()
void
update
(CinemaRating cinemaRating)
-
Field Details
-
connection
-
cinemaService
-
userService
-
-
Constructor Details
-
CinemaRatingService
public CinemaRatingService()Performs CinemaRatingService operation.
-
-
Method Details
-
create
- Specified by:
create
in interfaceIService<CinemaRating>
-
update
- Specified by:
update
in interfaceIService<CinemaRating>
-
delete
- Specified by:
delete
in interfaceIService<CinemaRating>
-
read
- Specified by:
read
in interfaceIService<CinemaRating>
-
getRatingForClientAndCinema
Retrieves the RatingForClientAndCinema value.- Returns:
- the RatingForClientAndCinema value
-
getAverageRating
Retrieves the AverageRating value.- Returns:
- the AverageRating value
-
getTopRatedCinemas
Retrieves the TopRatedCinemas value.- Returns:
- the TopRatedCinemas value
-
deleteByClientAndCinema
-
getCommentsByCinemaId
Retrieves the CommentsByCinemaId value.- Returns:
- the CommentsByCinemaId value
-
buildCinemaRating
-
buildCinemaComment
-