source: trip-planner/src/main/java/finki/diplomska/tripplanner/service/impl/RegionServiceImpl.java

Last change on this file was 76712b2, checked in by Ema <ema_spirova@…>, 3 years ago

search all locations by city or region

  • Property mode set to 100644
File size: 794 bytes
Line 
1package finki.diplomska.tripplanner.service.impl;
2
3import finki.diplomska.tripplanner.models.Region;
4import finki.diplomska.tripplanner.repository.jpa.JpaRegionRepository;
5import finki.diplomska.tripplanner.service.RegionService;
6import org.springframework.stereotype.Service;
7
8import java.util.List;
9
10@Service
11public class RegionServiceImpl implements RegionService {
12
13 private final JpaRegionRepository regionRepository;
14
15 public RegionServiceImpl(JpaRegionRepository regionRepository) {
16 this.regionRepository = regionRepository;
17 }
18
19 @Override
20 public List<Region> findAll() {
21 return this.regionRepository.findAll();
22 }
23
24 @Override
25 public List<String> getAllCitiesAndRegions() {
26 return this.regionRepository.getAllCitiesAndRegions();
27 }
28}
Note: See TracBrowser for help on using the repository browser.