Changeset eb5426c for src/main/java/com/example/moviezone/service
- Timestamp:
- 02/06/23 03:59:41 (23 months ago)
- Branches:
- master
- Children:
- f8ef9bd
- Parents:
- 448bd84
- Location:
- src/main/java/com/example/moviezone/service
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/moviezone/service/FilmService.java
r448bd84 reb5426c 5 5 import java.time.LocalDate; 6 6 import java.util.List; 7 import java.util.Optional; 7 8 8 9 public interface FilmService { … … 10 11 Film save(String name, Integer duration, String actors, String genre, 11 12 String age_category, String url, String director, LocalDate start_date,LocalDate end_date); 13 Optional<Film> getFilmById(Long id); 12 14 } -
src/main/java/com/example/moviezone/service/Impl/FilmServiceImpl.java
r448bd84 reb5426c 7 7 8 8 import java.time.LocalDate; 9 import java.util.Collections; 9 10 import java.util.List; 11 import java.util.Optional; 10 12 11 13 @Service … … 26 28 return filmRepository.save(new Film(name,duration,actors,genre,age_category,url,director,start_date,end_date)); 27 29 } 30 31 @Override 32 public Optional<Film> getFilmById(Long id) { 33 return filmRepository.findAllById(Collections.singleton(id.intValue())).stream().findFirst(); 34 } 35 28 36 } -
src/main/java/com/example/moviezone/service/Impl/ProjectionServiceImpl.java
r448bd84 reb5426c 25 25 } 26 26 27 @Override28 public List<Projection> findAllAvailableProjections(LocalDate date) {29 return projectionRepository.findAllByDate_time_startBefore(date);30 }31 27 32 28 @Override -
src/main/java/com/example/moviezone/service/ProjectionService.java
r448bd84 reb5426c 9 9 public interface ProjectionService { 10 10 List<Projection> findAllProjections(); 11 List<Projection> findAllAvailableProjections(LocalDate date);12 11 Projection save(LocalDate date_time_start,LocalDate date_time_end, String type_of_technology, Integer id_film ); 13 12 }
Note:
See TracChangeset
for help on using the changeset viewer.