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
|
Line | |
---|
1 | package com.project.beautycenter.service.impl;
|
---|
2 |
|
---|
3 | import com.project.beautycenter.model.Uplata;
|
---|
4 | import com.project.beautycenter.repository.UplataRepository;
|
---|
5 | import com.project.beautycenter.service.UplataService;
|
---|
6 | import org.springframework.stereotype.Service;
|
---|
7 |
|
---|
8 | import java.util.List;
|
---|
9 |
|
---|
10 | @Service
|
---|
11 | public 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.