Last change
on this file was f7c05a1, checked in by Elena Shulevska <elena.shulevska@…>, 15 months ago |
initial commit of the source code on origin
|
-
Property mode
set to
100644
|
File size:
769 bytes
|
Line | |
---|
1 | package com.example.villadihovo.service.impl.offers;
|
---|
2 |
|
---|
3 | import com.example.villadihovo.model.offers.Villa;
|
---|
4 | import com.example.villadihovo.repository.offers.VillaRepository;
|
---|
5 | import com.example.villadihovo.service.offers.VillaService;
|
---|
6 | import org.springframework.beans.factory.annotation.Autowired;
|
---|
7 | import org.springframework.stereotype.Service;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @Service
|
---|
12 | public class VillaServiceImpl implements VillaService {
|
---|
13 |
|
---|
14 | @Autowired
|
---|
15 | private VillaRepository villaRepository;
|
---|
16 |
|
---|
17 | @Override
|
---|
18 | public List<Villa> listAllVillas() {
|
---|
19 | List<Villa> villaList;
|
---|
20 | villaList = villaRepository.findAll();
|
---|
21 | return villaList;
|
---|
22 | }
|
---|
23 |
|
---|
24 | @Override
|
---|
25 | public Villa getById(Integer id) {
|
---|
26 | return this.villaRepository.getById(id);
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.