source: src/main/java/com/project/beautycenter/service/impl/UplataServiceImpl.java

Last change on this file was 850b344, checked in by Tamara Simikj <tamara.simic12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 784 bytes
RevLine 
[850b344]1package com.project.beautycenter.service.impl;
2
3import com.project.beautycenter.model.Uplata;
4import com.project.beautycenter.repository.UplataRepository;
5import com.project.beautycenter.service.UplataService;
6import org.springframework.stereotype.Service;
7
8import java.util.List;
9
10@Service
11public class UplataServiceImpl implements UplataService {
12 private final UplataRepository uplataRepository;
13
14 public UplataServiceImpl(UplataRepository uplataRepository) {
15 this.uplataRepository = uplataRepository;
16 }
17
18 @Override
19 public List<Uplata> findAll() {
20 return this.uplataRepository.findAll();
21 }
22
23 @Override
24 public Uplata findbyId(Integer id) {
25 return this.uplataRepository.findById(id).orElseThrow(NullPointerException::new);
26 }
27}
Note: See TracBrowser for help on using the repository browser.