Changeset 3ded84d in Git for src/main/java/com/wediscussmovies/project/service/impl/PersonServiceImpl.java
- Timestamp:
- 01/18/22 17:18:17 (3 years ago)
- Branches:
- main
- Children:
- e0ef1b1
- Parents:
- 7fafead
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.