source: src/main/java/com/example/baza/service/impl/AuthenticationServiceImpl.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: 879 bytes
Line 
1package com.example.baza.service.impl;
2
3
4import com.example.baza.model.Authentication;
5import com.example.baza.repository.AuthenticationRepository;
6import com.example.baza.service.AuthenticationService;
7import org.springframework.stereotype.Service;
8
9import java.util.List;
10import java.util.Optional;
11
12@Service
13public class AuthenticationServiceImpl implements AuthenticationService {
14 private final AuthenticationRepository authenticationRepository;
15
16 public AuthenticationServiceImpl(AuthenticationRepository authenticationRepository) {
17 this.authenticationRepository = authenticationRepository;
18 }
19
20 @Override
21 public List<Authentication> listAll() {
22 return this.authenticationRepository.findAll();
23 }
24
25 @Override
26 public Optional<Authentication> findById(Integer id) {
27 return this.authenticationRepository.findById(id);
28 }
29}
Note: See TracBrowser for help on using the repository browser.