Changeset 2a5d6a3 in Git for src/main/java/com/wediscussmovies/project/service/impl
- Timestamp:
- 01/16/22 15:29:49 (3 years ago)
- Branches:
- main
- Children:
- 7bc8942
- Parents:
- 7a0bf79
- Location:
- src/main/java/com/wediscussmovies/project/service/impl
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/service/impl/PersonServiceImpl.java
r7a0bf79 r2a5d6a3 28 28 } 29 29 30 @Override 31 public Optional<Person> findById(Integer person_id) { 32 return personRepository.findById(person_id); 33 } 30 34 31 35 @Override … … 38 42 return personRepository.findAllByPersonType(PersonType.A); 39 43 } 44 45 @Override 46 public boolean save(Person person) { 47 Person p = personRepository.save(person); 48 if(p != null) 49 return true; 50 return false; 51 } 52 53 @Override 54 public List<Person> findActorsByNameLike(String name) { 55 return personRepository.findAllByPersonTypeAndNameLike(PersonType.A, name); 56 } 57 58 @Override 59 public List<Person> findActorsBySurnameLike(String surname) { 60 return personRepository.findAllByPersonTypeAndSurnameLike(PersonType.A, surname); 61 } 62 63 @Override 64 public List<Person> findDirectorsByNameLike(String name) { 65 return personRepository.findAllByPersonTypeAndNameLike(PersonType.D, name); 66 } 67 68 @Override 69 public List<Person> findDirectorsBySurnameLike(String surname) { 70 return personRepository.findAllByPersonTypeAndSurnameLike(PersonType.D, surname); 71 } 40 72 }
Note:
See TracChangeset
for help on using the changeset viewer.