Last change
on this file since f8ef9bd was 1b248e4, checked in by milamihajlovska <mila.mihajlovska01@…>, 22 months ago |
service impl changes
|
-
Property mode
set to
100644
|
File size:
812 bytes
|
Line | |
---|
1 | package com.example.moviezone.service.Impl;
|
---|
2 |
|
---|
3 | import com.example.moviezone.model.Customer;
|
---|
4 | import com.example.moviezone.model.Ticket;
|
---|
5 | import com.example.moviezone.repository.TicketRepository;
|
---|
6 | import com.example.moviezone.service.TicketService;
|
---|
7 | import org.springframework.stereotype.Service;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @Service
|
---|
12 | public 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.