1 | package com.wediscussmovies.project.service;
|
---|
2 |
|
---|
3 | import com.wediscussmovies.project.ajaxmodels.Grade;
|
---|
4 | import com.wediscussmovies.project.model.Movie;
|
---|
5 | import com.wediscussmovies.project.model.Person;
|
---|
6 | import com.wediscussmovies.project.model.User;
|
---|
7 | import com.wediscussmovies.project.model.relation.MovieLikes;
|
---|
8 |
|
---|
9 | import java.sql.Date;
|
---|
10 | import java.util.List;
|
---|
11 | import java.util.stream.Collectors;
|
---|
12 |
|
---|
13 | public interface PersonService {
|
---|
14 | List<Person> findAll();
|
---|
15 | List<Person> findAllDirectors();
|
---|
16 | List<Person> findAllActors();
|
---|
17 | Person findById(Integer person_id);
|
---|
18 |
|
---|
19 | Person save(String name, String surname, Character type,
|
---|
20 | Date birthDate, String image_url, String description, List<Integer> movieIds);
|
---|
21 |
|
---|
22 | Person edit(Integer personId, String name, String surname, Character type,
|
---|
23 | Date birthDate, String image_url, String description, List<Integer> movieIds);
|
---|
24 |
|
---|
25 | List<Person> findPersonsByNameOrSurname(Character type,String searchQuery);
|
---|
26 |
|
---|
27 | List<Movie> findAllMoviesByPerson(Person person);
|
---|
28 |
|
---|
29 | void deleteById(Integer id);
|
---|
30 | void addGradePerson(Integer personId, User user, Grade grade);
|
---|
31 | }
|
---|