Changeset 7fafead in Git for src/main/java/com/wediscussmovies/project/service
- Timestamp:
- 01/16/22 20:22:55 (3 years ago)
- Branches:
- main
- Children:
- 3ded84d
- Parents:
- 2d57cad (diff), 7bc8942 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/main/java/com/wediscussmovies/project/service
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/service/DiscussionService.java
r2d57cad r7fafead 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model.Discussion; 4 5 import java.util.List; 6 import java.util.Optional; 7 3 8 public interface DiscussionService { 9 List<Discussion> listAll(); 10 List<Discussion> listAllByTitle(String title); 11 Optional<Discussion> findById(Integer id); 12 void save(Discussion discussion); 4 13 } -
src/main/java/com/wediscussmovies/project/service/GenreService.java
r2d57cad r7fafead 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model.Genre; 4 import org.springframework.stereotype.Service; 5 6 import java.util.List; 7 import java.util.Optional; 8 9 @Service 3 10 public interface GenreService { 11 public List<Genre> findAll(); 12 public Optional<Genre> findById(Integer id); 13 public List<Genre> findAllByType(String genre); 14 public Genre save(String genreName); 4 15 } -
src/main/java/com/wediscussmovies/project/service/MovieService.java
r2d57cad r7fafead 4 4 5 5 import java.util.List; 6 import java.util.Optional; 6 7 7 8 public interface MovieService { 8 9 public List<Movie> listAll(); 9 10 public List<Movie> searchByTitle(String title); 11 public Optional<Movie> findById(Long id); 12 public Movie save(Movie movie); 13 public void deleteById(Long id); 10 14 } -
src/main/java/com/wediscussmovies/project/service/PersonService.java
r2d57cad r7fafead 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model.Person; 4 5 import java.util.List; 6 import java.util.Optional; 7 3 8 public interface PersonService { 9 List<Person> findAllDirectors(); 10 List<Person> findAllActors(); 11 Optional<Person> findById(Integer person_id); 12 Optional<Person> findActorById(Integer id); 13 Optional<Person> findDirectorById(Integer id); 14 boolean save(Person person); 15 List<Person> findActorsByNameLike(String name); 16 List<Person> findActorsBySurnameLike(String surname); 17 List<Person> findDirectorsByNameLike(String name); 18 List<Person> findDirectorsBySurnameLike(String surname); 19 4 20 } -
src/main/java/com/wediscussmovies/project/service/ReplyService.java
r2d57cad r7fafead 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model.Reply; 4 5 import java.util.Optional; 6 3 7 public interface ReplyService { 8 public Reply save(Reply r); 9 public void delete(Reply r); 10 Optional<Reply> findById(Long id); 11 4 12 } -
src/main/java/com/wediscussmovies/project/service/UserService.java
r2d57cad r7fafead 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model.User; 4 5 import javax.servlet.http.HttpServletRequest; 6 import java.util.Optional; 7 3 8 public interface UserService { 9 public Optional<User> login(String email, String password); 10 public Optional<User> register(HttpServletRequest request, String email, String password, String confirmPassword, String username, String name, String surname); 4 11 } -
src/main/java/com/wediscussmovies/project/service/impl/MovieServiceImpl.java
r2d57cad r7fafead 7 7 8 8 import java.util.List; 9 import java.util.Optional; 9 10 10 11 @Service … … 22 23 23 24 @Override 25 public Optional<Movie> findById(Long id) { 26 return movieRepository.findById(1); 27 } 28 29 @Override 30 public Movie save(Movie movie) { 31 return movieRepository.save(movie); 32 } 33 34 @Override 35 public void deleteById(Long id) { 36 movieRepository.deleteById(0); 37 } 38 39 @Override 24 40 public List<Movie> searchByTitle(String title) { 25 41 return movieRepository.findAllByTitleLike("%"+title+"%"); 26 42 } 27 43 } 44 45
Note:
See TracChangeset
for help on using the changeset viewer.