Last change
on this file since 0f4f552 was ab49338, checked in by KostaFortumanov <kfortumanov@…>, 3 years ago |
Dodadeno prijavuvanje na objavi
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | package it.finki.charitable.services;
|
---|
2 |
|
---|
3 | import it.finki.charitable.entities.DonationPost;
|
---|
4 | import it.finki.charitable.entities.Reason;
|
---|
5 | import it.finki.charitable.entities.ReportPost;
|
---|
6 | import it.finki.charitable.repository.ReportPostRepository;
|
---|
7 | import org.springframework.stereotype.Service;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @Service
|
---|
12 | public class ReportPostService {
|
---|
13 |
|
---|
14 | private final ReportPostRepository reportPostRepository;
|
---|
15 |
|
---|
16 | public ReportPostService(ReportPostRepository reportPostRepository) {
|
---|
17 | this.reportPostRepository = reportPostRepository;
|
---|
18 | }
|
---|
19 |
|
---|
20 | public List<ReportPost> findAll() {
|
---|
21 | return reportPostRepository.findAll();
|
---|
22 | }
|
---|
23 |
|
---|
24 | public ReportPost findById(Long id) {
|
---|
25 | return reportPostRepository.getById(id);
|
---|
26 | }
|
---|
27 |
|
---|
28 | public ReportPost findByDonationPost(DonationPost post) {
|
---|
29 | return reportPostRepository.findByDonationPost(post);
|
---|
30 | }
|
---|
31 |
|
---|
32 | public void save(ReportPost post) {
|
---|
33 | reportPostRepository.save(post);
|
---|
34 | }
|
---|
35 |
|
---|
36 | public void delete(ReportPost reportPost) {
|
---|
37 | reportPostRepository.delete(reportPost);
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.