Changeset 7a0bf79 in Git for src/main/java/com/wediscussmovies/project/service
- Timestamp:
- 01/16/22 03:40:31 (3 years ago)
- Branches:
- main
- Children:
- 2a5d6a3
- Parents:
- 839f96a
- Location:
- src/main/java/com/wediscussmovies/project/service
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/service/GenreService.java
r839f96a r7a0bf79 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model.Genre; 4 5 import java.util.List; 6 import java.util.Optional; 7 3 8 public interface GenreService { 9 public List<Genre> findAll(); 10 public Optional<Genre> findById(Integer id); 11 public List<Genre> findAllByType(String genre); 12 public Genre save(String genreName); 4 13 } -
src/main/java/com/wediscussmovies/project/service/MovieService.java
r839f96a r7a0bf79 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(Integer id); 12 public Movie save(Movie movie); 13 public void deleteById(int id); 10 14 } -
src/main/java/com/wediscussmovies/project/service/PersonService.java
r839f96a r7a0bf79 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 public List<Person> findAllDirectors(); 10 public List<Person> findAllActors(); 11 Optional<Person> findActorById(Integer id); 12 Optional<Person> findDirectorById(Integer id); 4 13 } -
src/main/java/com/wediscussmovies/project/service/impl/MovieServiceImpl.java
r839f96a r7a0bf79 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(Integer id) { 26 return movieRepository.findById(id); 27 } 28 29 @Override 30 public Movie save(Movie movie) { 31 return movieRepository.save(movie); 32 } 33 34 @Override 35 public void deleteById(int id) { 36 movieRepository.deleteById(id); 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.