Changes in Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java [4103eaa:a762b3a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java
r4103eaa ra762b3a 7 7 8 8 import java.util.List; 9 import java.util.Optional; 9 10 10 11 @Service … … 23 24 24 25 @Override 25 public List<Pet> listpets() {return this.petRepository.findAll();} 26 public List<Pet> findAll() { 27 return this.petRepository.findAll(); 28 } 26 29 27 30 @Override 28 public Pet findById(Integer id) {29 return this.petRepository.findById( id).get();31 public Optional<Pet> findById(Integer petId) { 32 return this.petRepository.findById(petId); 30 33 } 31 34 }
Note:
See TracChangeset
for help on using the changeset viewer.