main
Last change
on this file since e76c5a6 was 59a8941, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago |
merge login and register into branch
|
-
Property mode
set to
100644
|
File size:
784 bytes
|
Rev | Line | |
---|
[a762b3a] | 1 | package finki.paw5.service.implementation;
|
---|
| 2 |
|
---|
| 3 | import finki.paw5.model.entities.Shelter;
|
---|
| 4 | import finki.paw5.repository.ShelterRepository;
|
---|
| 5 | import finki.paw5.service.ShelterService;
|
---|
| 6 | import org.springframework.stereotype.Service;
|
---|
| 7 |
|
---|
[da44aef] | 8 | import java.util.List;
|
---|
[a762b3a] | 9 | import java.util.Optional;
|
---|
| 10 |
|
---|
| 11 | @Service
|
---|
| 12 | public class ShelterServiceImplementation implements ShelterService {
|
---|
| 13 |
|
---|
| 14 | private final ShelterRepository shelterRepository;
|
---|
| 15 |
|
---|
| 16 | public ShelterServiceImplementation(ShelterRepository shelterRepository) {
|
---|
| 17 | this.shelterRepository = shelterRepository;
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | @Override
|
---|
| 21 | public Optional<Shelter> findById(Integer id) {
|
---|
| 22 | return this.shelterRepository.findById(id);
|
---|
| 23 | }
|
---|
[da44aef] | 24 |
|
---|
| 25 | @Override
|
---|
| 26 | public List<Shelter> listShelters() {
|
---|
| 27 | return shelterRepository.findAll();
|
---|
| 28 | }
|
---|
[59a8941] | 29 |
|
---|
| 30 |
|
---|
[a762b3a] | 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.