Ignore:
Timestamp:
02/06/23 03:59:41 (22 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
f8ef9bd
Parents:
448bd84
Message:

Home Page

File:
1 edited

Legend:

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

    r448bd84 reb5426c  
    77
    88import java.time.LocalDate;
     9import java.util.Collections;
    910import java.util.List;
     11import java.util.Optional;
    1012
    1113@Service
     
    2628        return filmRepository.save(new Film(name,duration,actors,genre,age_category,url,director,start_date,end_date));
    2729    }
     30
     31    @Override
     32    public Optional<Film> getFilmById(Long id) {
     33        return filmRepository.findAllById(Collections.singleton(id.intValue())).stream().findFirst();
     34    }
     35
    2836}
Note: See TracChangeset for help on using the changeset viewer.