main
Last change
on this file since c3268ca was c3268ca, checked in by Stefan Risteski <stefanristeski2001@…>, 9 months ago |
Project
The whole Project
|
-
Property mode
set to
100644
|
File size:
778 bytes
|
Line | |
---|
1 | package com.example.kvizko.service.impl;
|
---|
2 |
|
---|
3 | import com.example.kvizko.models.Attempt;
|
---|
4 | import com.example.kvizko.models.Quiz;
|
---|
5 | import com.example.kvizko.models.Quiztaker;
|
---|
6 | import com.example.kvizko.repository.AttemptRepository;
|
---|
7 | import com.example.kvizko.service.AttemptService;
|
---|
8 | import org.springframework.stereotype.Service;
|
---|
9 |
|
---|
10 | import java.sql.Date;
|
---|
11 |
|
---|
12 | @Service
|
---|
13 | public class AttemptServiceImpl implements AttemptService {
|
---|
14 |
|
---|
15 | private final AttemptRepository attemptRepository;
|
---|
16 |
|
---|
17 | public AttemptServiceImpl(AttemptRepository attemptRepository) {
|
---|
18 | this.attemptRepository = attemptRepository;
|
---|
19 | }
|
---|
20 |
|
---|
21 | @Override
|
---|
22 | public Attempt save(Quiztaker quiztaker, Date attemptDate, Quiz quiz) {
|
---|
23 | return attemptRepository.save(new Attempt(quiztaker, attemptDate, quiz));
|
---|
24 | }
|
---|
25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.