main
Last change
on this file since f484b14 was f484b14, checked in by andrejtodorovski <82031894+andrejtodorovski@…>, 18 months ago |
Added full functionality for creating order
|
-
Property mode
set to
100644
|
File size:
923 bytes
|
Rev | Line | |
---|
[feffc2f] | 1 | package com.example.autopartz.service.impl;
|
---|
| 2 |
|
---|
| 3 | import com.example.autopartz.model.RepairShop;
|
---|
| 4 | import com.example.autopartz.repository.RepairShopRepository;
|
---|
| 5 | import com.example.autopartz.service.RepairShopService;
|
---|
| 6 | import org.springframework.stereotype.Service;
|
---|
| 7 |
|
---|
| 8 | import java.util.List;
|
---|
| 9 |
|
---|
| 10 | @Service
|
---|
| 11 | public class RepairShopServiceImpl implements RepairShopService {
|
---|
| 12 | private final RepairShopRepository repairShopRepository;
|
---|
| 13 |
|
---|
| 14 | public RepairShopServiceImpl(RepairShopRepository repairShopRepository) {
|
---|
| 15 | this.repairShopRepository = repairShopRepository;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | @Override
|
---|
| 19 | public List<RepairShop> findAll() {
|
---|
| 20 | return repairShopRepository.findAll();
|
---|
| 21 | }
|
---|
[f484b14] | 22 |
|
---|
| 23 | @Override
|
---|
| 24 | public RepairShop getByName(String name) {
|
---|
| 25 | return repairShopRepository.getRepairShopByName(name);
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | @Override
|
---|
| 29 | public RepairShop getById(Integer id) {
|
---|
| 30 | return repairShopRepository.findById(id).get();
|
---|
| 31 | }
|
---|
[feffc2f] | 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.