Ignore:
Timestamp:
02/02/23 22:46:30 (22 months ago)
Author:
milamihajlovska <mila.mihajlovska01@…>
Branches:
master
Children:
ac25203
Parents:
f60cb20
Message:

service impl changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/service/Impl/TicketServiceImpl.java

    rf60cb20 r1b248e4  
    11package com.example.moviezone.service.Impl;
    22
     3import com.example.moviezone.model.Customer;
    34import com.example.moviezone.model.Ticket;
     5import com.example.moviezone.repository.TicketRepository;
    46import com.example.moviezone.service.TicketService;
    57import org.springframework.stereotype.Service;
     
    911@Service
    1012public class TicketServiceImpl implements TicketService {
    11     @Override
    12     public List<Ticket> findAllTickets() {
    13         return null;
     13    private final TicketRepository ticketRepository;
     14
     15    public TicketServiceImpl(TicketRepository ticketRepository) {
     16        this.ticketRepository = ticketRepository;
    1417    }
    1518
    1619    @Override
    17     public List<Ticket> findAllByCustomer() {
    18         return null;
     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);
    1927    }
    2028}
Note: See TracChangeset for help on using the changeset viewer.