source: src/main/java/com/example/baza/service/impl/BibliotekarServiceImpl.java

Last change on this file was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 1003 bytes
Line 
1package com.example.baza.service.impl;
2
3
4import com.example.baza.model.Bibliotekar2;
5import com.example.baza.repository.BibliotekarRepository;
6import com.example.baza.service.BibliotekarService;
7import org.springframework.stereotype.Service;
8
9import java.util.List;
10
11@Service
12public class BibliotekarServiceImpl implements BibliotekarService {
13 private final BibliotekarRepository bibliotekarRepository;
14
15 public BibliotekarServiceImpl(BibliotekarRepository bibliotekarRepository) {
16 this.bibliotekarRepository = bibliotekarRepository;
17 }
18
19 @Override
20 public List<Bibliotekar2> findAll() {
21 return this.bibliotekarRepository.findAll();
22 }
23
24 @Override
25 public List<Bibliotekar2> findByIdNaBibliotekar(Integer idNaBibliotekar) {
26 return this.bibliotekarRepository.findByIdNaBibliotekar(idNaBibliotekar);
27 }
28
29 @Override
30 public void delete(Integer idNaBibliotekar) {
31 this.bibliotekarRepository.deleteByIdNaBibliotekar(idNaBibliotekar);
32 }
33}
Note: See TracBrowser for help on using the repository browser.