source: Git/src/main/java/com/wediscussmovies/project/service/impl/ReplyServiceImpl.java@ 2a5d6a3

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 
1package com.wediscussmovies.project.service.impl;
2
3import com.wediscussmovies.project.model.Reply;
4import com.wediscussmovies.project.repository.ReplyRepository;
5import com.wediscussmovies.project.service.ReplyService;
6import org.springframework.stereotype.Service;
7
8import java.util.Optional;
9
10@Service
11public 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.