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:
879 bytes
|
Line | |
---|
1 | package com.project.beautycenter.service.impl;
|
---|
2 |
|
---|
3 | import com.project.beautycenter.model.Beautycenter;
|
---|
4 | import com.project.beautycenter.repository.BeautyCenterRepository;
|
---|
5 | import com.project.beautycenter.service.BeautyCenterService;
|
---|
6 | import org.springframework.stereotype.Service;
|
---|
7 |
|
---|
8 | import java.util.List;
|
---|
9 |
|
---|
10 | @Service
|
---|
11 | public class BeautyCenterServiceImpl implements BeautyCenterService {
|
---|
12 | private final BeautyCenterRepository beautyCenterRepository;
|
---|
13 |
|
---|
14 | public BeautyCenterServiceImpl(BeautyCenterRepository beautyCenterRepository) {
|
---|
15 | this.beautyCenterRepository = beautyCenterRepository;
|
---|
16 | }
|
---|
17 |
|
---|
18 | @Override
|
---|
19 | public List<Beautycenter> listAll() {
|
---|
20 | return this.beautyCenterRepository.findAll();
|
---|
21 | }
|
---|
22 |
|
---|
23 | @Override
|
---|
24 | public Beautycenter findById(String Id) {
|
---|
25 | return this.beautyCenterRepository.findById(Id).orElseThrow(NullPointerException::new);
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.