- Timestamp:
- 03/04/23 19:55:18 (16 months ago)
- Branches:
- main
- Children:
- 33b9f30
- Parents:
- 3c7bf5b (diff), f194b4e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- Prototype Application/Paw5/src/main/java/finki/paw5/service
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java
r3c7bf5b reac569a 2 2 3 3 import finki.paw5.model.entities.Pet; 4 import finki.paw5.web.controllers.PostController;5 4 6 5 import java.util.List; 7 import java.util.Optional;8 6 9 7 public interface PetService { … … 11 9 void save (Pet pet); 12 10 13 List<Pet> findAll();11 List<Pet> listpets(); 14 12 15 Optional<Pet> findById(Integer petId);13 Pet findById(Integer id); 16 14 } -
Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java
r3c7bf5b reac569a 2 2 3 3 import finki.paw5.model.entities.Post; 4 5 4 import java.util.List; 6 5 import java.util.Optional; -
Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java
r3c7bf5b reac569a 7 7 8 8 import java.util.List; 9 import java.util.Optional;10 9 11 10 @Service … … 23 22 } 24 23 25 @Override 26 public List<Pet> findAll() { 27 return this.petRepository.findAll(); 28 } 24 public List<Pet> listpets() {return this.petRepository.findAll();} 29 25 30 26 @Override 31 public Optional<Pet> findById(Integer petId) {32 return this.petRepository.findById( petId);27 public Pet findById(Integer id) { 28 return this.petRepository.findById(id).get(); 33 29 } 34 30 }
Note:
See TracChangeset
for help on using the changeset viewer.