Last change
on this file since 4ee640e was a554435, checked in by milamihajlovska <mila.mihajlovska01@…>, 22 months ago |
home controller added getMappings
|
-
Property mode
set to
100644
|
File size:
880 bytes
|
Line | |
---|
1 | package com.example.moviezone.service.Impl;
|
---|
2 |
|
---|
3 | import com.example.moviezone.model.Projection;
|
---|
4 | import com.example.moviezone.repository.ProjectionRepository;
|
---|
5 | import com.example.moviezone.service.ProjectionService;
|
---|
6 | import org.springframework.stereotype.Service;
|
---|
7 |
|
---|
8 | import java.time.LocalDate;
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @Service
|
---|
12 | public class ProjectionServiceImpl implements ProjectionService {
|
---|
13 | private final ProjectionRepository projectionRepository;
|
---|
14 |
|
---|
15 | public ProjectionServiceImpl(ProjectionRepository projectionRepository) {
|
---|
16 | this.projectionRepository = projectionRepository;
|
---|
17 | }
|
---|
18 |
|
---|
19 | @Override
|
---|
20 | public List<Projection> findAllProjections() {
|
---|
21 | return projectionRepository.findAll();
|
---|
22 | }
|
---|
23 |
|
---|
24 | @Override
|
---|
25 | public List<Projection> findAllAvailableProjections(LocalDate date) {
|
---|
26 | return projectionRepository.findAllByDate_time_startBefore(date);
|
---|
27 | }
|
---|
28 |
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.