main
Last change
on this file was 4d67d70, checked in by andrejtodorovski <82031894+andrejtodorovski@…>, 23 months ago |
Final touches
|
-
Property mode
set to
100644
|
File size:
757 bytes
|
Line | |
---|
1 | package com.example.autopartz.service.impl;
|
---|
2 |
|
---|
3 | import com.example.autopartz.model.Part;
|
---|
4 | import com.example.autopartz.model.Price;
|
---|
5 | import com.example.autopartz.repository.PriceRepository;
|
---|
6 | import com.example.autopartz.service.PriceService;
|
---|
7 | import org.springframework.stereotype.Service;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @Service
|
---|
12 | public class PriceServiceImpl implements PriceService {
|
---|
13 |
|
---|
14 | private final PriceRepository priceRepository;
|
---|
15 |
|
---|
16 | public PriceServiceImpl(PriceRepository priceRepository) {
|
---|
17 | this.priceRepository = priceRepository;
|
---|
18 | }
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public List<Price> findPriceForPart(Part part) {
|
---|
22 | return priceRepository.findAllByPart(part);
|
---|
23 | }
|
---|
24 |
|
---|
25 | @Override
|
---|
26 | public void save(Price p) {
|
---|
27 | priceRepository.save(p);
|
---|
28 | }
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.