Last change
on this file was d3cf3a1, checked in by Marija Micevska <marija_micevska@…>, 2 years ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
869 bytes
|
Line | |
---|
1 | package project.educatum.service.impl;
|
---|
2 |
|
---|
3 | import org.springframework.stereotype.Service;
|
---|
4 | import project.educatum.model.Interest;
|
---|
5 | import project.educatum.model.primarykeys.InterestID;
|
---|
6 | import project.educatum.repository.InterestRepository;
|
---|
7 | import project.educatum.service.InterestService;
|
---|
8 |
|
---|
9 | import java.time.LocalDate;
|
---|
10 |
|
---|
11 | @Service
|
---|
12 | public class InterestServiceImpl implements InterestService {
|
---|
13 |
|
---|
14 | private final InterestRepository interestRepository;
|
---|
15 |
|
---|
16 | public InterestServiceImpl(InterestRepository interestRepository) {
|
---|
17 | this.interestRepository = interestRepository;
|
---|
18 | }
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public void addSubjectStudent(Integer subjectID, Integer studentID, LocalDate datum) {
|
---|
22 | InterestID interestID = new InterestID(subjectID, studentID);
|
---|
23 | Interest interested = new Interest(interestID, datum);
|
---|
24 | interestRepository.save(interested);
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.