source: src/main/java/com/example/autopartz/service/impl/PriceServiceImpl.java

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 
1package com.example.autopartz.service.impl;
2
3import com.example.autopartz.model.Part;
4import com.example.autopartz.model.Price;
5import com.example.autopartz.repository.PriceRepository;
6import com.example.autopartz.service.PriceService;
7import org.springframework.stereotype.Service;
8
9import java.util.List;
10
11@Service
12public 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.