source: src/main/java/com/example/moviezone/service/Impl/WorkerServiceImpl.java

Last change on this file was 7926d68, checked in by DenicaKj <dkorvezir@…>, 21 months ago

Profiles for user and worker

  • Property mode set to 100644
File size: 757 bytes
Line 
1package com.example.moviezone.service.Impl;
2
3import com.example.moviezone.model.Worker;
4import com.example.moviezone.repository.WorkerRepository;
5import com.example.moviezone.service.WorkerService;
6import org.springframework.stereotype.Service;
7
8import java.util.List;
9
10@Service
11public class WorkerServiceImpl implements WorkerService {
12 private final WorkerRepository workerRepository;
13
14 public WorkerServiceImpl(WorkerRepository workerRepository) {
15 this.workerRepository = workerRepository;
16 }
17
18 @Override
19 public List<Worker> findAllWorkers() {
20 return workerRepository.findAll();
21 }
22
23 @Override
24 public Worker getWorkerByUsername(String username) {
25 return workerRepository.getByUsername(username);
26 }
27}
Note: See TracBrowser for help on using the repository browser.