source: src/main/java/com/example/medweb/service/impl/RezervacijaServiceImpl.java

Last change on this file was e5fefbd, checked in by Anita Terziska <63020646+Nit4e@…>, 2 years ago

initial commit

  • Property mode set to 100644
File size: 826 bytes
Line 
1package com.example.medweb.service.impl;
2
3import com.example.medweb.model.Rezervacija;
4import com.example.medweb.repository.RezervacijaRepository;
5import com.example.medweb.service.RezervacijaService;
6import org.springframework.stereotype.Service;
7
8import java.util.Optional;
9
10
11@Service
12public class RezervacijaServiceImpl implements RezervacijaService {
13
14 private final RezervacijaRepository rezervacijaRepository;
15
16 public RezervacijaServiceImpl(RezervacijaRepository rezervacijaRepository) {
17 this.rezervacijaRepository = rezervacijaRepository;
18 }
19
20 @Override
21 public void save(Rezervacija rezervacija) {
22
23 this.rezervacijaRepository.save(rezervacija);
24 }
25
26 @Override
27 public Optional<Rezervacija> findById(Integer id) {
28 return this.rezervacijaRepository.findById(id);
29 }
30}
Note: See TracBrowser for help on using the repository browser.