Changeset 3ded84d in Git for src/main/java/com/wediscussmovies/project/service
- Timestamp:
- 01/18/22 17:18:17 (3 years ago)
- Branches:
- main
- Children:
- e0ef1b1
- Parents:
- 7fafead
- Location:
- src/main/java/com/wediscussmovies/project/service
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/service/DiscussionService.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model. Discussion;3 import com.wediscussmovies.project.model.*; 4 4 5 5 import java.util.List; -
src/main/java/com/wediscussmovies/project/service/GenreService.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model. Genre;3 import com.wediscussmovies.project.model.*; 4 4 import org.springframework.stereotype.Service; 5 5 -
src/main/java/com/wediscussmovies/project/service/MovieService.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model. Movie;3 import com.wediscussmovies.project.model.*; 4 4 5 5 import java.util.List; … … 9 9 public List<Movie> listAll(); 10 10 public List<Movie> searchByTitle(String title); 11 public Optional<Movie> findById( Longid);11 public Optional<Movie> findById(Integer id); 12 12 public Movie save(Movie movie); 13 public void deleteById( Longid);13 public void deleteById(Integer id); 14 14 } -
src/main/java/com/wediscussmovies/project/service/PersonService.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model. Person;3 import com.wediscussmovies.project.model.*; 4 4 5 5 import java.util.List; -
src/main/java/com/wediscussmovies/project/service/UserService.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service; 2 2 3 import com.wediscussmovies.project.model. User;3 import com.wediscussmovies.project.model.*; 4 4 5 5 import javax.servlet.http.HttpServletRequest; -
src/main/java/com/wediscussmovies/project/service/impl/DiscussionServiceImpl.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service.impl; 2 2 3 import com.wediscussmovies.project.model. Discussion;3 import com.wediscussmovies.project.model.*; 4 4 import com.wediscussmovies.project.repository.DiscussionRepository; 5 5 import com.wediscussmovies.project.service.DiscussionService; -
src/main/java/com/wediscussmovies/project/service/impl/GenreServiceImpl.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service.impl; 2 2 3 import com.wediscussmovies.project.model. Genre;3 import com.wediscussmovies.project.model.*; 4 4 import com.wediscussmovies.project.repository.GenreRepository; 5 5 import com.wediscussmovies.project.service.GenreService; … … 24 24 @Override 25 25 public List<Genre> findAllByType(String genre) { 26 return genreRepository.findAllByGenre (genre);26 return genreRepository.findAllByGenreType(genre); 27 27 } 28 28 29 29 @Override 30 30 public Genre save(String genreName) { 31 31 Genre genre = new Genre(genreName); 32 32 return genreRepository.save(genre); 33 33 } -
src/main/java/com/wediscussmovies/project/service/impl/MovieServiceImpl.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service.impl; 2 2 3 import com.wediscussmovies.project.model. Movie;3 import com.wediscussmovies.project.model.*; 4 4 import com.wediscussmovies.project.repository.MovieRepository; 5 5 import com.wediscussmovies.project.service.MovieService; … … 23 23 24 24 @Override 25 public Optional<Movie> findById( Longid) {25 public Optional<Movie> findById(Integer id) { 26 26 return movieRepository.findById(1); 27 27 } … … 33 33 34 34 @Override 35 public void deleteById( Longid) {36 movieRepository.deleteById( 0);35 public void deleteById(Integer id) { 36 movieRepository.deleteById(id); 37 37 } 38 38 -
src/main/java/com/wediscussmovies/project/service/impl/PersonServiceImpl.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service.impl; 2 2 3 import com.wediscussmovies.project.model. Person;3 import com.wediscussmovies.project.model.*; 4 4 import com.wediscussmovies.project.model.enumerations.PersonType; 5 5 import com.wediscussmovies.project.repository.PersonRepository; … … 21 21 @Override 22 22 public List<Person> findAllDirectors() { 23 return personRepository.findAllBy PersonType(PersonType.D);23 return personRepository.findAllByType('D'); 24 24 } 25 25 26 26 @Override 27 27 public Optional<Person> findActorById(Integer id) { 28 return personRepository.findPersonByPerson _idAndPersonType(id, PersonType.A);28 return personRepository.findPersonByPersonIdAndType(id, 'A'); 29 29 } 30 30 … … 36 36 @Override 37 37 public Optional<Person> findDirectorById(Integer id) { 38 return personRepository.findPersonByPerson _idAndPersonType(id, PersonType.D);38 return personRepository.findPersonByPersonIdAndType(id, 'D'); 39 39 } 40 40 41 41 @Override 42 42 public List<Person> findAllActors() { 43 return personRepository.findAllBy PersonType(PersonType.A);43 return personRepository.findAllByType('A'); 44 44 } 45 45 … … 54 54 @Override 55 55 public List<Person> findActorsByNameLike(String name) { 56 return personRepository.findAllBy PersonTypeAndNameLike(PersonType.A, name);56 return personRepository.findAllByTypeAndNameLike('A', name); 57 57 } 58 58 59 59 @Override 60 60 public List<Person> findActorsBySurnameLike(String surname) { 61 return personRepository.findAllBy PersonTypeAndSurnameLike(PersonType.A, surname);61 return personRepository.findAllByTypeAndSurnameLike('A', surname); 62 62 } 63 63 64 64 @Override 65 65 public List<Person> findDirectorsByNameLike(String name) { 66 return personRepository.findAllBy PersonTypeAndNameLike(PersonType.D, name);66 return personRepository.findAllByTypeAndNameLike('D', name); 67 67 } 68 68 69 69 @Override 70 70 public List<Person> findDirectorsBySurnameLike(String surname) { 71 return personRepository.findAllBy PersonTypeAndSurnameLike(PersonType.D, surname);71 return personRepository.findAllByTypeAndSurnameLike('D', surname); 72 72 } 73 73 } -
src/main/java/com/wediscussmovies/project/service/impl/ReplyServiceImpl.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service.impl; 2 2 3 import com.wediscussmovies.project.model. Reply;3 import com.wediscussmovies.project.model.*; 4 4 import com.wediscussmovies.project.repository.ReplyRepository; 5 5 import com.wediscussmovies.project.service.ReplyService; -
src/main/java/com/wediscussmovies/project/service/impl/UserServiceImpl.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.service.impl; 2 2 3 import com.wediscussmovies.project.model.PasswordEncoder; 4 import com.wediscussmovies.project.model.User; 3 import com.wediscussmovies.project.model.*; 5 4 import com.wediscussmovies.project.model.exception.PasswordsDontMatchException; 6 5 import com.wediscussmovies.project.model.exception.UserWithEmailAlreadyExists; … … 8 7 import com.wediscussmovies.project.repository.UserRepository; 9 8 import com.wediscussmovies.project.service.UserService; 10 import org.springframework.http.HttpRequest;11 9 import org.springframework.stereotype.Service; 12 10 13 11 import javax.servlet.http.HttpServletRequest; 14 import java.security.NoSuchAlgorithmException;15 12 import java.util.Optional; 16 13
Note:
See TracChangeset
for help on using the changeset viewer.