source: src/main/java/com/example/moviezone/service/Impl/TicketServiceImpl.java@ 6032d44

Last change on this file since 6032d44 was 1b248e4, checked in by milamihajlovska <mila.mihajlovska01@…>, 22 months ago

service impl changes

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