1 | package com.wediscussmovies.project.service;
|
---|
2 |
|
---|
3 | import com.wediscussmovies.project.ajaxmodels.Grade;
|
---|
4 | import com.wediscussmovies.project.model.Genre;
|
---|
5 | import com.wediscussmovies.project.model.Movie;
|
---|
6 | import com.wediscussmovies.project.model.Person;
|
---|
7 | import com.wediscussmovies.project.model.User;
|
---|
8 | import com.wediscussmovies.project.querymodels.MovieLikesQM;
|
---|
9 | import org.springframework.data.jpa.repository.Query;
|
---|
10 |
|
---|
11 | import java.sql.Date;
|
---|
12 | import java.util.List;
|
---|
13 |
|
---|
14 | public interface MovieService {
|
---|
15 | List<Movie> listAll();
|
---|
16 | List<Movie> listAllByType(Character type);
|
---|
17 | List<Movie> listAllWithoutDirector();
|
---|
18 | List<Movie> searchByTitle(String title);
|
---|
19 | Movie findById(Integer id);
|
---|
20 | Movie findBasicById(Integer id);
|
---|
21 | List<Integer> listAllIds();
|
---|
22 | Movie save(String title, String description, String imageUrl, Date airingDate,Double rating,
|
---|
23 | Integer directorId,List<Integer> actorIds,List<Integer> genreIds);
|
---|
24 |
|
---|
25 | Movie edit(Integer movieId,String title, String description, String imageUrl, Date airingDate,Double rating,
|
---|
26 | Integer directorId,List<Integer> actorIds, List<Integer> genreIds);
|
---|
27 |
|
---|
28 | List<Person> findAllActorsForMovie(Movie movie);
|
---|
29 | List<Genre> findAllGenresForMovie(Movie movie);
|
---|
30 |
|
---|
31 | void likeMovie(Integer movieId, Integer userId);
|
---|
32 | void unlikeMovie(Integer movieId,Integer userId);
|
---|
33 |
|
---|
34 | List<Movie> findLikedMoviesByUser(User user);
|
---|
35 |
|
---|
36 | void deleteById(Integer id);
|
---|
37 |
|
---|
38 | void addGradeMovie(Integer movieId, User user, Grade grade);
|
---|
39 |
|
---|
40 | MovieLikesQM findLikesForMovieById(int movieId);
|
---|
41 | }
|
---|