main
Last change
on this file since 2a5d6a3 was 2a5d6a3, checked in by Petar Partaloski <ppartaloski@…>, 2 years ago |
Controller, Repository and Service layer improvements, Entity updating
|
-
Property mode
set to
100644
|
File size:
831 bytes
|
Line | |
---|
1 | package com.wediscussmovies.project.service.impl;
|
---|
2 |
|
---|
3 | import com.wediscussmovies.project.model.Reply;
|
---|
4 | import com.wediscussmovies.project.repository.ReplyRepository;
|
---|
5 | import com.wediscussmovies.project.service.ReplyService;
|
---|
6 | import org.springframework.stereotype.Service;
|
---|
7 |
|
---|
8 | import java.util.Optional;
|
---|
9 |
|
---|
10 | @Service
|
---|
11 | public class ReplyServiceImpl implements ReplyService {
|
---|
12 | private final ReplyRepository replyRepository;
|
---|
13 |
|
---|
14 | public ReplyServiceImpl(ReplyRepository replyRepository) {
|
---|
15 | this.replyRepository = replyRepository;
|
---|
16 | }
|
---|
17 |
|
---|
18 | @Override
|
---|
19 | public Optional<Reply> findById(Integer id) {
|
---|
20 | return replyRepository.findById(id);
|
---|
21 | }
|
---|
22 |
|
---|
23 | @Override
|
---|
24 | public void delete(Reply r) {
|
---|
25 | replyRepository.delete(r);
|
---|
26 | }
|
---|
27 |
|
---|
28 | @Override
|
---|
29 | public Reply save(Reply r) {
|
---|
30 | return replyRepository.save(r);
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.