source: src/main/java/com/example/moviezone/service/Impl/CustomerServiceImpl.java@ 17a2fda

Last change on this file since 17a2fda was 00fa72f, checked in by DenicaKj <dkorvezir@…>, 21 months ago

Reservation Implemented

  • Property mode set to 100644
File size: 804 bytes
Line 
1package com.example.moviezone.service.Impl;
2
3import com.example.moviezone.model.Customer;
4import com.example.moviezone.repository.CustomerRepository;
5import com.example.moviezone.service.CustomerService;
6import org.springframework.stereotype.Service;
7
8import java.util.List;
9import java.util.Optional;
10
11@Service
12public class CustomerServiceImpl implements CustomerService {
13 private final CustomerRepository customerRepository;
14
15 public CustomerServiceImpl(CustomerRepository customerRepository) {
16 this.customerRepository = customerRepository;
17 }
18
19 @Override
20 public List<Customer> findAllCustomers() {
21 return customerRepository.findAll();
22 }
23
24 @Override
25 public Optional<Customer> getCustomerById(int id) {
26 return customerRepository.findById(id);
27 }
28}
Note: See TracBrowser for help on using the repository browser.