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

Home Page

Location:
src/main/java/com/example/moviezone/service/Impl
Files:
2 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}
  • src/main/java/com/example/moviezone/service/Impl/ProjectionServiceImpl.java

    r448bd84 reb5426c  
    2525    }
    2626
    27     @Override
    28     public List<Projection> findAllAvailableProjections(LocalDate date) {
    29         return projectionRepository.findAllByDate_time_startBefore(date);
    30     }
    3127
    3228    @Override
Note: See TracChangeset for help on using the changeset viewer.